|  | 
|  | 
| вернуться в форум | А very strange thing When my part of code was:
 int k = 0;
 char S[100001], c;
 while (cin.get(c)) S[k++] = c;
 
 I got WA #1 several times, but my program worked correctly for all tests!
 
 Then I replaced this part of code to:
 
 string S; cin >> S;
 
 and got AC in 0.031s. It's very strange because I think my old program was right too. And I didn't expect that class string works so fast even if length = 100000 :)
 Maybe there are weak tests? Or an error in check system?
 | 
 | 
|