-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuva-11286.cpp
51 lines (36 loc) · 880 Bytes
/
uva-11286.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//uva 11286 Conformity
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
int main(void)
{
int n = 0;
while (true) {
cin >> n;
if (n == 0)
break;
map < vector <int>, int> course;
for (int i = 0; i < n; ++i){
vector <int> tmp;
for (int j = 0; j < 5; ++j){
int t;
cin >> t;
tmp.push_back(t);
}
sort(tmp.begin(), tmp.end());
++course[tmp];
}
int max_value = -1;
for (auto a : course)
if (a.second > max_value)
max_value = a.second;
int frosh = 0;
for (auto a : course)
if (a.second == max_value)
frosh += a.second;
cout << frosh << endl;
}
return 0;
}