ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1322. Spy

А very strange thing
Posted by bsu.mmf.team 28 Nov 2010 23:24
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?