ACM14KG3- Discount on Crackers getting WA using Floyd-Warshall algorithm

Question - https://www.codechef.com/LRNDSA08/problems/ACM14KG3
Solution link - https://www.codechef.com/viewsolution/33388694

Can anyone check why this soln is getting WA?

Cannot view the solution since it’s contest, provide the code with proper indentation here itself

@prabhu04 Your code is failing here:

if(s.size()!= t.size()){
            cout<<"NO"<<"\n";
            break;
}

If for any test case your answer is “NO”, then you will be break out of the while loop and remaining test cases will be missed out.

Oh! My bad…Thanks @abdulskhan_445, silliest of the mistakes this one