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

To admins: My recursive solution in java works with Xint option
Posted by Khuder 3 Oct 2006 17:47
I've solved this problem in C++. But I can't get AC in Java. Some clever guy from america told me that there's a thread checking my program and because it is not using tree, it uses only recursive calls this checking thread also uses stack. And in result this special thread causes stack overflow. He suggested me to use "java -Xint p1136". p1136 is my class. It worked on my computer. But I think on the server there's no one used this option. Am I right? Does it mean that we must use binary tree to solve this problem and no other way for recursive solution?
Read this about using recursion (+)
Posted by Vladimir Yakovlev (USU) 3 Oct 2006 23:41
Just look at the last paragraph of java faq:
http://acm.timus.ru/java.aspx
Re: Read this about using recursion (+)
Posted by Khuder 5 Oct 2006 10:16
You want me to use maximum 3000 threads?
Re: Read this about using recursion (+)
Posted by Khuder 6 Oct 2006 09:02
Oh, I've done it. Without so many threads.:)