|
|
back to boardAsk for sample output ? I think I don't understand exactly this problem. For the input : 3 4 { 1 2 3 4 5 6 7 8 9 10 11 12 } I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away. Then I jump 5 6 7 8 over 9 10 11 12 --> 9 10 11 12 are taken away. Then I jump 6 over 5, 7 over 8 --> only 6 and 7 are in the grid. Last I jump 6 over 7 so it's only one stone in the grid . Why the sample output is 2 ? Thanks. 71222119 Re: Ask for sample output ? <= Wrong tram trong ! > I think I don't understand exactly this problem. For the > input : > > 3 4 > { > 1 2 3 4 > 5 6 7 8 > 9 10 11 12 > } > I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away. the remaining board is 5 6 7 8 z z z z z z z z 9 10 11 12 so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12. The correct answer is 1 2 3 4 2 z z 3 4 2 9 z 3 4 2 3 4 5 6 7 8 => 5 6 7 8 => 6 7 8 => 6 7 8 9 A B C 9 A B C A B C A B C Do the same as above, you'll get the board 3 4 7 8 B C and then 4 8 C => get the board of 2 4 z z C Good luck ! QH@ (z means space) Re: But the task don't say that : a stone can jump only to the next stone beside ? > > I think I don't understand exactly this problem. For the > > input : > > > > 3 4 > > { > > 1 2 3 4 > > 5 6 7 8 > > 9 10 11 12 > > } > > I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away. > > the remaining board is > 5 6 7 8 > z z z z > z z z z > 9 10 11 12 > so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12. > > The correct answer is > 1 2 3 4 2 z z 3 4 2 9 z 3 4 2 3 4 > 5 6 7 8 => 5 6 7 8 => 6 7 8 => 6 7 8 > 9 A B C 9 A B C A B C A B C > Do the same as above, you'll get the board > 3 4 > 7 8 > B C > and then > 4 > 8 > C > => get the board of 2 > 4 > z > z > C > > Good luck ! > > QH@ > > (z means space) uh, it's a similar game, maybe the text is not very clearly, but we (who got AC) all understand it by that way ;) > > > I think I don't understand exactly this problem. For > the > > > input : > > > > > > 3 4 > > > { > > > 1 2 3 4 > > > 5 6 7 8 > > > 9 10 11 12 > > > } > > > I jump 5 6 7 8 over 1 2 3 4 --> 1 2 3 4 are taken away. > > > > the remaining board is > > 5 6 7 8 > > z z z z > > z z z z > > 9 10 11 12 > > so you can't get 5, 6, 7, 8 jump over 9, 10, 11 and 12. > > > > The correct answer is > > 1 2 3 4 2 z z 3 4 2 9 z 3 4 2 3 4 > > 5 6 7 8 => 5 6 7 8 => 6 7 8 => 6 7 8 > > 9 A B C 9 A B C A B C A B C > > Do the same as above, you'll get the board > > 3 4 > > 7 8 > > B C > > and then > > 4 > > 8 > > C > > => get the board of 2 > > 4 > > z > > z > > C > > > > Good luck ! > > > > QH@ > > > > (z means space) Re: uh, it's a similar game, maybe the text is not very clearly, but we (who got AC) all understand it by that way ;) xxxx...| |xxxx...| |.xxx...| |..x....| |..x....| xxxx...|=>|xxxx...|=>|.xxx...|=>|..x....|=>|..x....| xxxx...| |..x.x..| |x.x.x..| |xxxxx..| |x..x.x.| |....... |....... =>|.......=> => |x.xx.x. x...xx. x.....x |
|
|