There are M job applicants and N jobs. Each applicant has a subset of jobs that he/she is interseted in. Each job opening can only accept one applicant and a job applicant can be appointed for only one job. Find an assignment of jobs to applicant in such that as many applicants as possible get jobs.
First line consists of test case T. First line of every test case consists of two integers M and N. Second line of every test case consists of M*N spaced bool values(0 and 1).
Output: Returns a integer value, denoting the number of applicants can get the job.