0_0_20613607_29228.cpp:5:6: error: expected unqualified-id before numeric constant
0)) { ans = tmp; pos = i; } } else { for(int s=0;s<len;s++) { for(int j=0;j<len;j++) { huan[j] = str[(s+j) % len]; } huan[len] = '\0'; int tmp = CompareString(huan , dic[i] , len , l); if(tmp < ans || (tmp == ans && strcmp(dic[pos] , dic[i]) > 0)) { ans = tmp; pos = i; } } } } printf("%s %d\n",dic[pos],ans); return;} int main(){ while(~scanf("%s",str)) { solve(); } return 0;}
^
0_0_20613607_29228.cpp:5:93: error: expected declaration before '}' token
0)) { ans = tmp; pos = i; } } else { for(int s=0;s<len;s++) { for(int j=0;j<len;j++) { huan[j] = str[(s+j) % len]; } huan[len] = '\0'; int tmp = CompareString(huan , dic[i] , len , l); if(tmp < ans || (tmp == ans && strcmp(dic[pos] , dic[i]) > 0)) { ans = tmp; pos = i; } } } } printf("%s %d\n",dic[pos],ans); return;} int main(){ while(~scanf("%s",str)) { solve(); } return 0;}
^
|