题目链接:https://cn.vjudge.net/problem/UVA-272
AC代码:
1 /* */ 2 #include <iostream> 3 #include <stdio.h> 4 #include <string.h> 5 #include <cmath> 6 #include <climits> 7 #include <ctime> 8 #include <list> 9 #include <algorithm> 10 #include <bitset> 11 #include <deque> 12 #include <queue> 13 #include <stack> 14 #include <set> 15 #include <map> 16 #include <vector> 17 #include <cstdlib> 18 #include <functional> 19 using namespace std; 20 21 typedef long long LL; 22 int main() 23 { 24 int c; 25 int q = 1; 26 while((c=getchar())!=EOF ) 27 { 28 if( c=='"') 29 { 30 printf("%s", q?"``":"''"); 31 q = !q; 32 } 33 else 34 printf("%c", c); 35 } 36 return 0; 37 }