Created
August 10, 2016 11:01
-
-
Save TheoKlein/fab8f19dfb89aba6b8a3cf24bc4ef013 to your computer and use it in GitHub Desktop.
ZeroJudge c007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main () { | |
| string input; | |
| bool quote = false; | |
| while( getline(cin , input) ){ | |
| for(int i = 0 ; i < input.length() ; ++i){ | |
| if(input[i] == '"'){ | |
| if(quote){ | |
| cout << "''"; | |
| quote = false; | |
| }else{ | |
| cout << "``"; | |
| quote = true; | |
| } | |
| }else{ | |
| cout << input[i]; | |
| } | |
| } | |
| cout << endl; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment