Organizing Containers of Balls

  • + 1 comment

    i think the website has made a mistake in giving answers to the test cases.

    my logic is:

    1. count the total no. of balls of type i.

    2. count the total no. of balls in container i.

    3. if these two values are equal for each i then it is possible otherwise impossible.

    shown below is an input of test case 1:

    4

    997612619 934920795 998879231 999926463

    960369681 997828120 999792735 979622676

    999013654 998634077 997988323 958769423

    997409523 999301350 940952923 993020546

    they have given the answer as possible which is clearly not the case