|
|
back to boardStuck at WA#3 Posted by begi 30 Nov 2014 18:39 Can someone provide more tests? I am using scanner.nextLine() to read line.charAt(pos) == '?' to compare in java and also Josephus allgorithm: jos[1] = 1; for (int i = 2; i < max_n; i++) { jos[i] = (jos[i - 1] + 1998) % i + 1; } My code is so small that I don't even know where is the bug Re: Stuck at WA#3 Posted by begi 8 Dec 2014 20:13 Ok, the thing is I misunderstood the problem. You read ALL the input ignoring new lines, and then do the 'process'. I was reading line by line and doing 'process' for each line. Hope it will help the others. |
|
|