|
|
вернуться в форумProblem 1094 "E-screen" has been rejudged (+) Old tests were fixed: end-of-line characters were added in the end of input. New tests were added. Validator program was updated. Timelimit was decreased to 0.25 sec. After rejudge 26 authors got AC, but 512 lost AC. Edited by author 07.01.2007 07:34 Re: Problem 1094 "E-screen" has been rejudged (+) I changed one symbol im my program and got AC once more. Maybe is there a bug again? Maybe your new program is correct? (-) Check the tests again, please In the problem statement it is said: "The single line of the input contains..." The SINGLE LINE means no '\n' characters! but this program gets Crash(1): #include <stdio.h> int main() { char c; while (scanf("%c", &c) == 1) { if (c == '\n') throw(0); } return 0; } And this one gets TL(1) #include <stdio.h> int main() { char c; while (scanf("%c", &c) == 1) { if (c == '\n') while(1); } return 0; } Isn't it strange ??? Edited by author 08.01.2007 20:43 The single line supposes '\n' character in the end (-) Edited by author 09.01.2007 13:53 Re: The single line supposes '\n' character in the end (-) Interesting :-) I always thought that '\n'-character is the splitter for lines . That means if the number of '\n'-characters is K, so the number of lines is K+1... I think, that you should write in problem statement - "there is endline character after input" or "input is ended by endline char" I don't insist to change problem statement or tests, I just want to tell my opinion. I am sure, if you open the file with one of your test in text editor you will see 2 lines (the second one is empty). It is not very "interesting" to get WA because of that :-) Re: The single line supposes '\n' character in the end (-) If you open a file in a hexedit then you'll see that 0A0D symbols are the end of line, followed by EOF. So there is exactly 1 line, but notepad lets you to move your cursor on another line just because there was end of line though there isn't second line endeed. |
|
|