Untitled
unknown
c_cpp
2 years ago
497 B
6
Indexable
#include<iostream>
#include <map>
//#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> v(100000, 0);
for(int i =0 ; i < n; i++) {
int h, m, d;
cin >> h >> m >> d;
int S = h * 60 + m;
int E = S + d + 1;
v[S]++;
v[E + 1]--;
}
int sum = 0;
int res = 0;
for(int i = 0; i < 100000; i++) {
sum += v[i];
res = max(res, sum);
}
cout << res << endl;
return 0;
}
Editor is loading...
Leave a Comment