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

Question -
Solution link -

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()){

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