Wrong Answer in Spoj Army

I am unable to understand why I am getting WA in this problem
Will someone please point out the mistake or provide me the test case for which my Algo fails …i have used the approach of comparing each and every soldier of the army by their strength …My solution link is 02V8D2 - Online C++ Compiler & Debugging Tool - Ideone.com

Someone please help me