Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
太晚了,睡前a道水题#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string ans; int i=0; while(getline(cin,ans)) { unsigned loc=0; do { ++i; loc=ans.find('\"',loc); if(loc==string::npos){--i;break;} if(i%2)ans.replace(loc,1,"``"); else ans.replace(loc,1,"''"); } while (loc!=string::npos); cout<<ans<<endl; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator