It seems that either I can't read the input correctly or there is a test case where either the disk value is not between 1 and m or the peg value not between 1 and p. Can you check it please?
I was just typing the same thing...
It seems we both got SIGABRT a minute apart
I just found out that I was really reading the input wrong.I was reading the first number of each test case as m, and the third as number of towers.
I am afraid I can't fix the test data the moment, becouse I don't know how (it will probably be fixed by the problemsetter in a few hours ). If you need to submit now, please add a clause to ignore the test case where the number of the target tower (the second in the line) is 0. Solutions will be rejudged later.
Anyway, I corrected my mistake, and now I know exactly which assert made my program terminate:assert(k>0 && k<=p);That means there must be a test case where the destination pile is not between 1 and p.Edit: thanks for your quick reply
If there are any further problems, please let us know.
I'm sorry, it was my fault, one of the 1000 cases was wrong (some of them were randomly generated),it is now correct, I hope I rejudged all submissions, the results changed because test cases are slightly different,
thanks, anyway,
good luck!
mima
I used an assert(d!=1) and my program got Accepted. So there is no test case with d = 1. Why?I am asking because I wrote a function exactly for this special case. Since I think, d = 1 is more difficult to handle than d>1, and d = 1 is inside the constraints of the problem description, there should be at least one case with d=1 in the judge input.
I've done some changes but only with T-parameteres (because some of them were unfortunately choosen) and I removed this bug (d=0).
I'm sorry for the inconvenience.
I gave you a small gift, is it ok?