GETTING WA in GIFT RIFTS problem

please tell me what is wrong…i have done exactly what i did in my accepted solution…http://www.codechef.com/viewsolution/7322263

Hey, just add another break after breaking from inner loop. i mean, when you get row[i] = col[j] , you are printing answer, and breaking that loop, add statement if(flag) break; to break it from outer loop also, check this solution, i made edits and submitted it.

http://www.codechef.com/viewsolution/7322568 :slight_smile:

1 Like

ahh found my mistake…understood it now…thanks…