#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
const int N = 1e6 +10;
int a[N];
int b[N];
int d[N];
int dd[N];
int tm[N];
int main() {
int n;
cin>>n;
int t[3] = {0};
tm[0] = -1e8;
for (int i=1;i<=n;i++){
cin>>tm[i]>>a[i]>>b[i];
a[i] += 3;
}
for (int i=1;i<=n;i++){
t[a[i]/4] += 100;
if (a[i]==a[i-1] and tm[i] - tm[i-1] <= 10)
t[a[i]/4] += 50;
}
cout<<t[1]<<" "<<t[2]<<endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4444 KB |
Output is correct |
2 |
Correct |
1 ms |
4440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
1 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4440 KB |
Output is correct |
4 |
Correct |
2 ms |
4440 KB |
Output is correct |
5 |
Correct |
1 ms |
4444 KB |
Output is correct |
6 |
Correct |
1 ms |
4544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4444 KB |
Output is correct |
2 |
Correct |
1 ms |
4440 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
1 ms |
4440 KB |
Output is correct |
6 |
Correct |
2 ms |
4440 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4544 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Incorrect |
1 ms |
4444 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |