# doubt in CSTRIKE1

in the above problem consider the below test case:
t=1
n=2

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

Yes, as it shows…

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

In

7 3 the output should be YES

1 Like

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

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

yes…the same problem occurs with me…

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 http://www.geeksforgeeks.org/dynamic-programming-set-18-partition-problem/

1 Like
//