提示: 欢迎访问OurACM平台。
Problem 1839 Open Source University Meetup

Accept: 136    Submit: 315
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

"Open Source University Meetup" is commonly abbreviated to "OSUM" (pronounced "awesome"). OSUM Community, the most vibrant community of student developers and on-campus clubs anywhere. As an OSUM member, you can get access to free training, on-campus events, and lots of free student resources that can fast-track your career.

To get the most from your participation in the OSUM Community, we encourage you to get started by joining the OSUM Club at your university so you don't miss out on all the cool on-campus activities. Have fun!

As OSUM leaders, we want to choose the appropriate time to schedule our activities, in order to let more students have leisure time to participate our activities. We want to hold K activities in the new semester. We know that the students will give different favorite scores to the day when we hold an activity by an investigation. Probably because he/she may arrange some other things on the day when we will hold the activity .

It is really a problem for us that how to schedule K activities in the new semester in order to win the highest students' favorite scores. Plz write a program to solve the problem.

Input

The input consists of several test cases. The first line of each case contains three integers N, T, K (1<=N<=1,000, 1<=K<=T<=1,000). N represents the number of students we investigated, T represents the number of days we may hold the activities, and K represents the number of activities we will hold. We can not hold two or more activities in one day. The following N lines, each contains T integers, which represents a student's favorite score for the day I (1<=I<=T). The arrange of favorite score is 0..100.

Output

For each test case, output the highest students' favorite scores when K activities are hold.

Sample Input

5 6 2 10 0 10 100 99 50 10 100 70 80 40 20 20 20 30 20 9 100 30 100 100 100 100 100 0 10 90 0 80 30

Sample Output

628

Source

Funny Programming Contest -- OSUM

Submit  Back  Status  Discuss