Programming Group Competition (implemented in C Language) and Programming Group Competition in C Language

Source: Internet
Author: User

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

  

  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.