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

Some input samples. Please answer anybody.
Posted by Bandera 2 Aug 2005 16:55
What the answer for:
1. (*(**)
2. (*54846)*)
3. *)
4. (**)*)
I think that:
1. NO
2. YES
3. NO
4. NO

What is the correct answer?
Re: Some input samples. Please answer anybody.
Posted by Gleb Grenkin 14 Aug 2005 14:03
I tested on my AC solution:

1. YES.
2. YES.
3. NO.
4. NO.

On first test program should print NO, because you shouldn't consider nested comments.
(*(**) means that there is only one comment in the text and
second sequence of symbols (* is only text inside the comment.

Good luck!