|
|
back to boardDoes it matte how many couples there exist? And, eventually, when a group of 10 hobbits remains unsplit, do I have to split it? I mean, it's possible for some hobbits o remain unsplitted..... what should I do with them? i just read it and nothing else -_- > i just read it and nothing else -_- The role is that: you can give answer only reading n and k. =) =) Here is a small test case: 12 0 1 3 2 5 3 5 4 2 2 5 5 1 6 1 7 1 8 1 9 1 3 2 10 2 11 3 4 2 12 1 13 1 10 2 14 1 15 1 11 2 16 1 17 2 17 2 18 1 19 1 The answer is 66. It is given to understand when to stop reading cases, I guess. If you use EOF checking and there will be anything else in the input, your solution will fail. |
|
|