doubt in CSTRIKE1

in the above problem consider the below test case:

7 3

o/p should “NO” because both can’t kill enemies at rhe same time…
but in the successful submission it is “YES”

Yes…it should be “NO” and my solution gives the same…
My soln

1 Like

It is a simple problem, that outputs “YES” if the total strength can be divided into two parts, otherwise “NO”


7 3 the output should be YES

1 Like

I also encountered the same problem in this set : 2 4 5 7 10 12 .
Used this input on a successful submission.
They can’t kill the terrorists at the same time in whatever way they try. But, the output shows yes.
Any explanation for such situations ?

1 Like

I am the author for that question. I am extremely sorry for weak test cases. The question can be broken down to Can an Array be partitioned into two non-empty equal sub-arrays. For implementation you can visit here

1 Like

your solution is successful??

Yes, as it shows…

in case of 7 3 sinchan and ace can’t kill enemies at same time
because one take 7 and other take 3…so o/p should “NO”.

1 Like

yes…the same problem occurs with me…