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 1427. SMS

I have just reloaded all the tests from 17 till the last one (+)
Posted by Dmitry 'Diman_YES' Kovalioff 12 Feb 2006 17:07
That tests were no terminated by the end of lines indeed because of force majeure... Now the new rules for tests are being developed to prevent such things in the future. Anyway we must apologize for it.

If you got WA(17), you may run your program again.

Edited by author 12.02.2006 17:11
why not rejudge the contest? :'(
Posted by Love_** 12 Feb 2006 17:10
SafeBird, could you check if the tests are correct now? (-)
Posted by Dmitry 'Diman_YES' Kovalioff 12 Feb 2006 17:13
yes, AC now. (that one is my TestID).....
Posted by Safe Bird 12 Feb 2006 17:17
I started to code G at the beginning of the contest...
and I soon found it wa on 18......
my teammate starts to help me find the bug....

it was until 4hours after the beginning, my teammate uses Pascal and ACed.........

:'(  if i have aced G at the beginning, things would possibly change:(
Well... (+)
Posted by Dmitry 'Diman_YES' Kovalioff 12 Feb 2006 17:23
17-th test was the first test that had not eoln, but your program passed it. If the problem appeared because of eoln, it could fail on 17-th test. Could you explain it?

Edited by author 12.02.2006 17:25
I don't know it exactly.(+)
Posted by Safe Bird 12 Feb 2006 17:29
have you read the other post of mine?

if i use:
    for (;;)
    {
        if (feof(Fin)) break;
        char ch=fgetc(Fin);
        if (ch=='\n') break;
 ...
}
i will pass 17, but if i use:
        char ch=fgetc(Fin);
        if (ch=='\n') break;
i will TLE on 17.

i don't know why my program passes 17, but failed on 18. you could see my submission, the original program will get AC.
i am currently on icq:162109001.(-)
Posted by Safe Bird 12 Feb 2006 17:34
Re (+)
Posted by Dmitry 'Diman_YES' Kovalioff 12 Feb 2006 17:50
It is beyond my rights to look at your submission and it is beyond my power to rejudge the contest. Vladimir Yakovlev will make a decision about this problem.

I do not use ICQ :( But one day I will.

Edited by author 12.02.2006 17:51
Re: I don't know it exactly.(+)
Posted by Vladimir Yakovlev (USU) 12 Feb 2006 18:02
these statements are not useful:

if (feof(Fin)) break;
char ch=fgetc(Fin);
if (ch=='\n') break;

use should use these:

char ch=fgetc(Fin);
if (ch=='\n' || ch==EOF) break;

BECAUSE
feof(FILE*) returns true iff the end-of-file was already read. So you terminate input string with character 255.

Tests were correct, but with no eoln before oef. You considered such situation but made a mistake.
But
Posted by Safe Bird 12 Feb 2006 21:11
"char ch=fgetc(Fin);
if (ch=='\n' || ch==EOF) break;"

is against the problem description!

i think this problem should be rejudged, since you have said:
"The advertisement is terminated by the end of line."
in the description!

Edited by author 12.02.2006 21:13
But why did you use feof?
Posted by Vladimir Yakovlev (USU) 13 Feb 2006 01:23
see in(+)
Posted by Safe Bird 13 Feb 2006 13:43
I don't know much difference between feof and ch==EOF, BUT

the problem has said that input is terminated by '\n'! I thought there will be no difference between using that line or not!!!

you could contact "Dmitry 'Diman_YES' Kovalioff", the test cases 17,18,... are indeed wrong during the contest.
(now they are okay)