# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1064538 | chandu33 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 436 KiB |
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 main() {
int n;
scanf("%d", &n);
int team1 = 0, team2 = 0;
vector<int> last(9, -1);
for(int i = 0; i < n; i++) {
int t, a, b;
scanf("%d %d %d", &t, &a, &b);
if(a >= 1 && a <= 4) {
team1 += 100;
} else {
team2 += 100;
}
if(last[a] == -1) {
last[a] = t;
} else {
int diff = t - last[a];
if(diff <= 10) {
if(a >= 1 && a <= 4) {
team1 += 50;
} else {
team2 += 50;
}
}
last[a] = t;
}
}
printf("%d %d", team1, team2);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |