Chef In Fantasy League April Lunchtime

https://www.codechef.com/viewsolution/32382397
May I know whats wrong with my code ?
Despites using the correct logic, its showing wrong answer on submitting .

It is not necessary both set have size>0
eg-
1
n=3 s=50
10 20 30
0 0 0

you are missing a test case that if all the players will be forward only then there is no way to select so answer would be no

1
4 90
3 8 6 5
1 1 1 1

Ok i got it thanks !!!