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 1027. D++ Again

WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by Access Violation 6 Jan 2008 02:47
Help please! I want to solve this problem, my program pass all the tests I've found in this forum successful! Why I've got WA on test 1! TELL ME PLEASE about this test! I can't understand what is wrong in my program!

P.S. My program pass these tests correctly:

(*)     - NO
(*(*)   - YES
(**)    - YES
(*8*)*) - NO
(       - NO
())(D   - NO

(123
321)    - YES

(1+2+3
)       - YES

qe()eq  - YES
q(())q  - YES

45(798+-
)(**)()  - YES


And task example text pass successful too.


Explain me please what is test 1. I can't solve this problem without this information.
Re: WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by alt (Uzhgorod NU) 6 Jan 2008 03:04
First test must be example test, so check your input/output first.

P.S. This program passed test #1

#include <stdio.h>

int main()
{
printf("YES\n");
return 0;
}
Re: WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by Access Violation 6 Jan 2008 12:44


Edited by author 06.01.2008 12:52
Re: WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by Access Violation 6 Jan 2008 12:48
It's very strange. My program outputs 'YES' or 'NO', it's correct. But maybe I should read input data from text file? My current program reads input data in a cycle ('while') and reads it for symbols one by one.
Re: WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by Access Violation 6 Jan 2008 12:51
Here is fragment of my code which reads input data. Answer me please, is it correct?

while( not eof ) do
 begin
  read( c );

 //...
 end;
Re: WA #1 HELP ME PLEASE I'D LIKE TO SOLVE THIS PROBLEM!!!
Posted by Access Violation 6 Jan 2008 18:01
I've verified, such reading method is correct. So, I can't understand where I've done a mistake. My program outputs YES while passing the example test. But I always get WA on test 1. Give me please the first test, I must solve this problem.