HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC - 2013-2014 > problem:


50386 - Conformity

IMPC - 2013-2014

Start: Mar.16.2013 at 12:00:00 PM
Finish: Mar.16.2013 at 05:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 50386 - Conformity
• 14-01-10. 50457 - The Number of W...
• 14-01-40. 50419 - The longest bitoni...
• 14-01-50. 50795 - Trunk
• 14-03-10. 50412 - K numbers
• 14-03-20. 50398 - Sum of kth Anti-d...
• 14-03-30. 50377 - kth Permutation
• 14-03-40. 50773 - Balanced Sum Tree
• 14-03-60. 50382 - Parkside's Other ...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Taken from UVA Online Judge.

Conformity

Frosh (college freshmen) commencing their studies at Waterloo have diverse interests, as evidenced by their desire to take various combinations of courses from among those available.

University administrators are uncomfortable with this situation, and therefore wish to offer a conformity prize to frosh who choose the most popular combination of courses. How many frosh will win the prize?

The input consists of several test cases. Each test case begins with an integer 1 ≤ n ≤ 10000, the number of frosh. For each frosh, a line follows containing the course numbers of five distinct courses selected by the frosh. Each course number is an integer between 100 and 499.

The popularity of a combination is the number of frosh selecting exactly the same combination of courses. A combination of courses is considered most popular if no other combination has higher popularity. For each line of input, you should output a single line giving the total number of students taking some combination of courses that is most popular.

Sample Input 1

3

100 101 102 103 488

100 200 300 101 102

103 102 101 488 100

 

Output for Sample Input 1

2

 

Sample Input 2

3

200 202 204 206 208

123 234 345 456 321

100 200 300 400 444

 

Output for Sample Input 2

3

 

Для отправки решений необходимо выполнить вход.

www.contester.ru