[Task299] Tree Visualization - Probable glitch in the checker

Back to General discussions forum

kostis_k     2022-10-30 09:26:11
User avatar

Like the title says, I get a "wrong answer" response from the checker with the message

"Line #10 should be | |   |"

Line #10 should definitely not have a gap of three spaces between "|" characters according to the problem description, so it's obviously wrong. In fact Line #10 is "| | | |". I got the same response for two successive input data, so I'm reporting this for a check. My code is there for Rodion to see, and I can also paste both input data sets, if necessary. Oh, and good morning everyone!

gardengnome     2022-10-30 10:25:48
User avatar

Hi,

I took the first input example from your code and run it. Line #10 should be as the error message suggests. Here are the first 10 lines of output:

01 root
02 |
03 +-3qwj7i
04 | |
05 | +-5q4m7a
06 | | |
07 | | +-42hqdn
08 | | |
09 | | \-74gvlj
10 | |   |
kostis_k     2022-10-30 21:58:59
User avatar

Turns out I hadn't properly "figured out remaining details of the format" (as per the problem statement) and made a fool of myself in the process. Somehow seeing your excerpt above made it click. I choose to blame the simplistic example given in the problem that didn't give that detail away :) .

By the way, while I don't usually check out other's solutions I couldn't but be surprised by the brevity of the solution, both from you and zelevin. Remarkable.

So, thanks! Another one down...

Please login and solve 5 problems to be able to post at forum