You are viewing a single comment's thread. Return to all comments →
i think the website has made a mistake in giving answers to the test cases.
my logic is:
count the total no. of balls of type i.
count the total no. of balls in container i.
if these two values are equal for each i then it is possible otherwise impossible.
shown below is an input of test case 1:
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