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 1253. Necrologues

A deficit was found in this problem!!!
Posted by Pasha 13 Jul 2004 22:00
This problem may be solved using non-recursive DFS agorithm, but a defect is situated in this problem. An example of input:
{!!!!!!!Beginning of the input on the next line!!!!!!!!}
A simple line,
wich hasn't any tricks,
only two anchors:*2 and *4#
*3#
*2#
This line is the last one in
this input#
{^The end of the input. This line doesn't belong to input^}
The output due to the problem,  must be "#", but why can't we skip the empty cycle "Line 2 - Line 3 - Line 2 - ,...,etc." ? In this way the output can be like this one:

A simple line,
wich hasn't any tricks,
only two anchors: and This line is the last one in
this input

I think that using this remark, problem may become more difficult and more INTERESTING!!!
What is Your opinion about all this?
Re: A deficit was found in this problem!!!
Posted by Romanchik Vitaly 14 Jul 2004 04:56
I don't know about triks in this problem !!!
I solved it by such way:
Maked a tree and then starting from leaves calculated the total quantity of letters !!! Then if the quantity in the root more than 1000000 outputes No else writed answer !!!!