Productive productivity
Practice
0 (0 votes)
Algorithms
Approved
Graphs
Medium
Open
Problem
24% Success 1139 Attempts 30 Points 3s Time Limit 256MB Memory 1024 KB Max Code

Little Jhool is a very lenient teaching assistant in his college. He doesn't like cutting the marks of students, so obviously, every student in his tutorial loves him. Specially, the girls. They're crazy about him.

But anyway, the teacher has got to know about the leniency of Jhool while giving marks, so this time in exam, he decides to give a different exam paper to every single student to check how well have the students been taught by Jhool. Now, Little Jhool knows the strong and weak topics of every single student, so he wants to maximize the total marks obtained by students in his tutorial.

You are given the number of students in Jhool's tutorial, denoted by n - n also being the number of different exam papers - that is, one for every student. Every student will get only one exam paper to solve. You are further given a matrix, (n x n) denoting the marks every student will get if he attempts a particular exam paper. You've to help Jhool figure out a way by which he could maximize the total score obtained by his entire class.

Input:
First line contains number of test cases T. The second line contains an integer, denoting n, followed by a n X n matrix - denoting the respective scores of every student in that respective exam.

Output:
Find the TOTAL maximum score obtained by all the students combined.

Constraints:
1<=T<=20
1<=N<=100
1<=Aij<=1000

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
1 votes
Tags:
AlgorithmsApprovedGraphsMediumNumber TheoryOpen
Points:30
2 votes
Tags:
AlgorithmsApprovedBinary SearchGraphsMediumOpenWeighted bipartite matching
Points:30
3 votes
Tags:
AlgorithmsGraphsHungarianMedium