Alok-Nath and Sanskar

I am getting WA in 2 testcase one in each subtask. Can someone please tell be any corner testcase?
what will be output for below testcase
1
5 4
0 0 0 0 0

does it will be yes or no?

please donot submit your problems now as codechef is evaluating every answer as wrong answer , wait for some time .

Answer should be “yes” for the case mentioned in question.
For case

1
4 5
0 0 0 0

Answer should be “no”

Answer should be yes as you can distribute 3 sanskar with 0 intensity to 3 followers and 2 sanskar with 0 intensity to 1 follower.

So if sum of all intensities is 0 then check for condition that whether size of array >= No. of followers.

Try these:

9 3
1 3 0 3 2 2 2 2 6
yes

6 4
2 2 0 1 1 2
yes

9 2
1 0 1 2 1 0 0 0 1
yes

1 2
0
no

I have more test cases about 1000 you may check them of this link :

http://www.codeskulptor.org/#user38_WW62cvJ9II_0.py

Just copy someones AC code and test your code and copied one on ideone using these test cases…

1 Like

Undeleted…

Thanks alot bro
Wonderful cases