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 1136. Parliament

I need help! WA #1
Posted by Stiff 29 Nov 2012 20:11
I can't understand what's wrang? I just build BST and make reverse post order..
Maybe there are some troubles with input?
Please help me. [I'll delete code after receiving some feedback]

[Code deleted]

Edited by author 29.11.2012 21:04
Re: I need help! WA #1
Posted by Stiff 29 Nov 2012 21:06
problem was in wrang input:
input values could be in different lines...

i've changed
int[] arr = parseInt(Console.ReadLine().Trim().Split(' '));
to
int[] arr = parseInt(sReader.ReadToEnd().Split(new char[] {' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries));

and get AC;)

Edited by author 29.11.2012 21:06