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 1038. Spell Checker

Hint for WA#3
Posted by Cebotari Vladislav 27 Dec 2016 18:30
I had WA#3 because of how I was reading the input in C:
while (gets(buff) != NULL) {
    int i = 0;
    while (buff[i] != '\0') {
        // process char by char
        i++;
    }
}

Changed to:
while ((c = getchar()) != EOF) {
    // process char by char
}

And it works AC!!!