0_0_23243172_15641.cpp:3:10: error: #include expects "FILENAME" or <FILENAME>
#include #include #include #include #include using namespace std;
^
0_0_23243172_15641.cpp:21:1: error: 'vector' does not name a type
vector b[2000];
^
0_0_23243172_15641.cpp:24:1: error: 'string' does not name a type
string str;
^
0_0_23243172_15641.cpp: In function 'int main()':
0_0_23243172_15641.cpp:47:1: error: 'b' was not declared in this scope
b[i].clear();
^
0_0_23243172_15641.cpp:50:22: error: expected ';' before 'b'
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}if (ch[t1]==ch[t2]){h[ch[t1]][0]++;h[ch[t2]][1]--;update(t1,0);update(t2,0);while(a[t2]==0) { t2--; if (t2<0) break; }while(a[t1]==0) { t1++; if (t1>n-1) break; }continue;} if(h[ch[t1]][0]==h[ch[t1]][1]) { t3=b[ch[t2]][h[ch[t2]][0]]; h[ch[t2]][0]++;h[ch[t2]][1]--; tot=tot+(t4=query(t3-1)); update(t2,0); update(t3,0); while(a[t2]==0) { t2--; if (t2<0) break; } } else { t3=b[ch[t1]][h[ch[t1]][1]]; h[ch[t1]][1]--;h[ch[t1]][0]++; tot=tot+(t4=(query(n-1)-query(t3))); update(t1,0); update(t3,0); while(a[t1]==0) { t1++; if (t1>n-1) break; } } } printf("%I64d\n",tot); } return 0;}
^
0_0_23243172_15641.cpp:50:22: error: 'b' was not declared in this scope
0_0_23243172_15641.cpp:50:43: error: expected ')' before ';' token
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}if (ch[t1]==ch[t2]){h[ch[t1]][0]++;h[ch[t2]][1]--;update(t1,0);update(t2,0);while(a[t2]==0) { t2--; if (t2<0) break; }while(a[t1]==0) { t1++; if (t1>n-1) break; }continue;} if(h[ch[t1]][0]==h[ch[t1]][1]) { t3=b[ch[t2]][h[ch[t2]][0]]; h[ch[t2]][0]++;h[ch[t2]][1]--; tot=tot+(t4=query(t3-1)); update(t2,0); update(t3,0); while(a[t2]==0) { t2--; if (t2<0) break; } } else { t3=b[ch[t1]][h[ch[t1]][1]]; h[ch[t1]][1]--;h[ch[t1]][0]++; tot=tot+(t4=(query(n-1)-query(t3))); update(t1,0); update(t3,0); while(a[t1]==0) { t1++; if (t1>n-1) break; } } } printf("%I64d\n",tot); } return 0;}
^
0_0_23243172_15641.cpp:50:122: error: 'b' was not declared in this scope
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}if (ch[t1]==ch[t2]){h[ch[t1]][0]++;h[ch[t2]][1]--;update(t1,0);update(t2,0);while(a[t2]==0) { t2--; if (t2<0) break; }while(a[t1]==0) { t1++; if (t1>n-1) break; }continue;} if(h[ch[t1]][0]==h[ch[t1]][1]) { t3=b[ch[t2]][h[ch[t2]][0]]; h[ch[t2]][0]++;h[ch[t2]][1]--; tot=tot+(t4=query(t3-1)); update(t2,0); update(t3,0); while(a[t2]==0) { t2--; if (t2<0) break; } } else { t3=b[ch[t1]][h[ch[t1]][1]]; h[ch[t1]][1]--;h[ch[t1]][0]++; tot=tot+(t4=(query(n-1)-query(t3))); update(t1,0); update(t3,0); while(a[t1]==0) { t1++; if (t1>n-1) break; } } } printf("%I64d\n",tot); } return 0;}
^
0_0_23243172_15641.cpp:50:252: error: expected ';' before '{' token
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}if (ch[t1]==ch[t2]){h[ch[t1]][0]++;h[ch[t2]][1]--;update(t1,0);update(t2,0);while(a[t2]==0) { t2--; if (t2<0) break; }while(a[t1]==0) { t1++; if (t1>n-1) break; }continue;} if(h[ch[t1]][0]==h[ch[t1]][1]) { t3=b[ch[t2]][h[ch[t2]][0]]; h[ch[t2]][0]++;h[ch[t2]][1]--; tot=tot+(t4=query(t3-1)); update(t2,0); update(t3,0); while(a[t2]==0) { t2--; if (t2<0) break; } } else { t3=b[ch[t1]][h[ch[t1]][1]]; h[ch[t1]][1]--;h[ch[t1]][0]++; tot=tot+(t4=(query(n-1)-query(t3))); update(t1,0); update(t3,0); while(a[t1]==0) { t1++; if (t1>n-1) break; } } } printf("%I64d\n",tot); } return 0;}
^
0_0_23243172_15641.cpp:50:252: error: expected primary-expression before '{' token
0_0_23243172_15641.cpp:50:252: error: expected ')' before '{' token
0_0_23243172_15641.cpp:50:321: error: expected ';' before 'update'
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}if (ch[t1]==ch[t2]){h[ch[t1]][0]++;h[ch[t2]][1]--;update(t1,0);update(t2,0);while(a[t2]==0) { t2--; if (t2<0) break; }while(a[t1]==0) { t1++; if (t1>n-1) break; }continue;} if(h[ch[t1]][0]==h[ch[t1]][1]) { t3=b[ch[t2]][h[ch[t2]][0]]; h[ch[t2]][0]++;h[ch[t2]][1]--; tot=tot+(t4=query(t3-1)); update(t2,0); update(t3,0); while(a[t2]==0) { t2--; if (t2<0) break; } } else { t3=b[ch[t1]][h[ch[t1]][1]]; h[ch[t1]][1]--;h[ch[t1]][0]++; tot=tot+(t4=(query(n-1)-query(t3))); update(t1,0); update(t3,0); while(a[t1]==0) { t1++; if (t1>n-1) break; } } } printf("%I64d\n",tot); } return 0;}
^
0_0_23243172_15641.cpp:50:332: error: expected ')' before ';' token
for(i=0;i b[ch[i]].push_back(i);tk=0; for(i=1;i<=1000;i++) { h[i][0]=0; h[i][1]=b[i].size()-1;if (b[i].size()%2==1) tk++; }if (!((tk==1&&n%2==1)||(tk==0))){printf("-1\n");continue;} for(i=0;i { a[i]=0; c[i]=0; } for(i=0;i update(i,1); t1=0; t2=n-1; tot=0;d=true; for(;;) { if(t1>=t2) break;if(h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1]) {d=false;break;}i
|