-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFree_cash.cpp
More file actions
38 lines (37 loc) · 793 Bytes
/
Free_cash.cpp
File metadata and controls
38 lines (37 loc) · 793 Bytes
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
#include <iostream>
#include <map>
#include <string>
#include <iterator>
#include <algorithm>
#include <vector>
#include <utility>
#include <vector>
using namespace std;
bool ord2(pair<pair<int,int>,int> a, pair<pair<int,int>,int> b){
return a.second > b.second;
}
int main() {
int n;
int h;
int min;
int matriz[24][60];
for(int i = 0; i < 24; i++){
for(int j = 0; j < 60; j++){
matriz[i][j] = 0;
}
}
cin >> n;
for(int i = 0; i < n; i++){
cin >> h >> min;
matriz[h][min] = matriz[h][min] + 1;
}
int min2 = 0;
for(int i = 0; i < 24; i ++){
for(int j = 0; j < 60; j++){
if(matriz[i][j] > min2){
min2 = matriz[i][j];
}
}
}
cout << min2;
}