Matrix Search challenge solving

#include

using namespace std;

int main()

{

int n,m,t;

cin>>t;

Please look at my code and let me know what am i doing wrong?

You are using a wrong approach in this question. You have to solve this question by using binary search, since elements of matrix are in sorted order,