| 
 | 
вернуться в форумThe tests are a little bit incorrect. If we have, let's say, 10 boxes of the first variety and 10 boxes of the second variety we can come up with: 1  2  3  4  5  6  7  8  9  10 10 20 30 40 50 60 70 80 90 100 (1 line: from 1 to n; 2 line: from n to m*n with step of n) In this case we never allocate boxes of even weight. If we take box number 10 from the first line and box number 3 from the second, we get 10+30=40. The best solution would be the box number 1 from the first line and the box number 4 from the second one: 1+40=41. But 40!=41 The system gives me WA on the very first test. All integers in output must be different, so your answer is wrong. Oops... Indeed! Shame on my inattention :( Thanks, mate!  |  
  | 
|