What is wrong with my solution for PROBSET?

Link to Problem: Contest Page | CodeChef

It runs fine for given test case, but shows wrong answer when submitted.

Code(C++)
#include<bits/stdc++.h>

using namespace std;

long long findSum(string str)

{

long long sum=0;

for(auto i=0;i<str.size();i++)

    if(str[i]=='1')

        sum++;

return sum;

}

int main(){

long long T,N,M,sum;

string s;

vector<string> vN,vM;

cin>>T;

while(T--){

    cin>>N>>M;

    for(long long i=0;i<N;i++){

        cin>>s;

        vN.push_back(s);

        cin>>s;

        vM.push_back(s);

    }

    for(long long i=0;i<N;i++){

        sum=(findSum(vM.at(i)));

        if((sum!=M&&vN.at(i)=="correct")){  

             cout<<"INVALID"<<endl;

             break;

             }

        else if(sum==M&&vN.at(i)=="wrong")

            s="WEAK";

        else if(s!="WEAK"&&i==N-1){

            cout<<"FINE"<<endl;    

            break;

        }  

        else if(s=="WEAK"&&i==N-1)

            {

                cout<<"WEAK"<<endl;

                break;

            }

          }

    vM.clear();

    vN.clear();

}

}