标签:
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<queue> #include<algorithm> using namespace std; const int N=1e5+10; const int M=50000; const int INF=0x3f3f3f3f; int a[N]; int main () { int T, n, s1, e1, s2, e2, x, s, e, i, ans, Max; scanf("%d", &T); while (T--) { memset(a, 0, sizeof(a)); ans = 0; Max = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &x); scanf("%d:%d %d:%d", &s1, &s2, &e1, &e2); s = s1*60+s2+1; e = e1*60+e2+1; a[s] += x; a[e] -= x; } for (i = 0; i < N; i++) { ans += a[i]; Max = max(ans, Max); } printf("%d\n", Max); } return 0; }
HDU 4883 TIANKENG’s restaurant(BestCoder Round #2)
标签:
原文地址:http://www.cnblogs.com/syhandll/p/4897644.html