Programming Group Competition (implemented in C Language) and Programming Group Competition in C Language
Programming Group Competition (implemented in C language ).
The rules for the programming group competition are as follows: each contestant is composed of several members; all members are in independent competition; the contestant is the sum of the scores of all members; and the highest score is the winner. Now, you can write a program to find the champion army.
Input Format:
Enter a positive integer N (<= 10000) In the first line, that is, the total number of all participating players. In the next N rows, each row shows the score of a team member in the format of "Team Number-team member number score", where "Team Number" is a positive integer between 1 and 1000, the "team member number" is a positive integer ranging from 1 to 10, and the "score" is an integer ranging from 0 to 100.
Output Format:
Output the number and total score of the champion army in a row, separated by a space. Note: The title must be unique.
Input example:
6
3-1099
11-587
102-10
102-3100
11-989
3-261
Output example:
11176
# Include
Int main () {int m, TeamCode, NumCode, cj, I, max = 0; int a [10001] = {0}; scanf ("% d ", & m); for (I = 0; I