|
|
back to boardcompile error Posted by NaNyan 31 Aug 2013 06:14 #include<stdio.h> #include<algorithm> #include<list> using namespace std; int main(){ char str[200000]; cin>>str; bool litter[26]; for(int i=0;i<26;i++) { litter[i]=false; } for(int i=0;i<strlen(str);i++) { litter[str[i]-'a']=!litter[str[i]-'a']; } list<char> clist; for(int i=0;i<strlen(str);i++) { if(litter[str[i]-'a']) { litter[str[i]-'a']=false; clist.push_back(str[i]); } } copy(clist.begin(),clist.end(),ostream_iterator<char>(cout)); return 0; } it do works on my own machine, How? |
|
|