Submission #496489

#TimeUsernameProblemLanguageResultExecution timeMemory
496489kappaLjeto (COCI21_ljeto)C++14
50 / 50
1 ms204 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...