#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
const int N = 1e6 +10;
int a[N];
int b[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];
if (a[i]<5)
a[i] = 1;
else
a[i] = 2;
if (b[i]<5)
b[i] = 1;
else
b[i] = 2;
}
for (int i=1;i<=n;i++){
t[a[i]] += 100;
if (a[i]==a[i-1] and tm[i] - tm[i-1] <= 10)
t[a[i]] += 50;
}
cout<<t[1]<<" "<<t[2]<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4444 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
4444 KB |
Output is correct |
3 |
Incorrect |
2 ms |
4444 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |