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 1005. Stone Pile

Could anyone please suggest test #1. I am getting WA #1
Posted by Anupam Ghosh, Wipro Technologies 30 Oct 2011 18:18
I am trying to solve this using java.

Could anyone please suggest test #1. I am getting WA #1.
What will be the output if there is only 1 stone?
1
10000

I am getting answer:
10000

is this correct?

Again for n=20 I get this output

20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
0

Could you please confirm if this is correct?

regards
Anupam




Edited by author 30.10.2011 19:05
Re: Could anyone please suggest test #1. I am getting WA #1
Posted by Anupam Ghosh, Wipro Technologies 3 Nov 2011 23:52
Hi All,
        The test cases shown above are correct. I just got AC now using brute force method. That is you need to try all combinations possible. Actual erroe was TLE but being shown as wa#1. Now pls try refrain from using character array or String in your algo. Because dealing with text makes your algo slow.

All the best.
regards
Anupam