Back in the original contest the "magic" was that they had some extra space characters here and there. At least that was the reason I didn't win it (in contests P.E.'s are not accepted) and I guess they haven't changed it yet. If you want to get "Accepted", look at the html src on how to set spaces.
Once more, I suggest that in online contests, P.E.'s are accepted, just like in the problemset...
Or make the problem setters who screw the data pay for it!
so if the moves are completed before m moves are made do you stop and go on to the next, or do you carry on printing completed boards or do you carry on moving pieces back and forth ?
what about when m=0 ? presumably you just output the board and move on to the next ?
ive had about 15 wa's on this and cant really see why at all
I've tried about everything I can think of, but I keep receiving WAs.
- The program has correctly formatted output: diff expected.txt mine.txt doesn't locate differences, where "expected" is pasted from the web, and "mine" is generated using the web's example input.
- The program gives correct answers for
1 100
...
6 100
and ends a testcase once it has already been solved.
- Odd disk numbers are correctly placed on stack "C".
what else should I check?
any newlines/spaces I may have missed? (that is, that are not present in web's example output).
1) The sample output is wrong here. The first ouput case for 64 2 is wrong, which probably most people have noticed without asking.
2) Just in case you're using the iterative algorithm, be careful when n is odd. For n odd, you have to move the smallest disk 'counter-clockwise' in order for the end result to be on peg C.
3) When m > 2^n-1 (ie. when the configuration is done but input still asks you to continue), just keep on printing the final configuration.
Hi!
I think that the sample output for problem#1 is wrong. It seems that on the first move it just removes a disk from A and doesn't put it anywhere. Am I right?