This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |