#include <bits/stdc++.h>
using namespace std;
int n, p1, p2, players[8];
struct event{
int time, from, to, team;
};
event d[105];
int main(){
memset(players, -11, sizeof(players));
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> d[i].time >> d[i].from >> d[i].to;
if(d[i].from <= 4){
d[i].team = 1;
}else{
d[i].team = 2;
}
}
for (int i = 0; i < n; i++)
{
if(d[i].team == 1){
p1 += 100;
if(d[i].time - players[d[i].from - 1] <= 10){
p1 += 50;
}
}
else{
p2 += 100;
if(d[i].time - players[d[i].from - 1] <= 10){
p2 += 50;
}
}
players[d[i].from - 1] = d[i].time;
}
cout << p1 << " " << p2;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
204 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
0 ms |
204 KB |
Output is correct |
12 |
Correct |
0 ms |
204 KB |
Output is correct |
13 |
Correct |
0 ms |
204 KB |
Output is correct |