# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1089885 | toast12 | Ljeto (COCI21_ljeto) | C++14 | 0 ms | 348 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;
cin >> n;
vector<vector<int>> v(1+8);
for (int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
v[a].push_back(t);
}
int a = 0, b = 0;
for (int i = 1; i <= 4; i++) {
a += v[i].size() * 100;
for (int j = 1; j < v[i].size(); j++) {
if (v[i][j]-v[i][j-1] <= 10)
a += 50;
}
}
for (int i = 5; i <= 8; i++) {
b += v[i].size() * 100;
for (int j = 1; j < v[i].size(); j++) {
if (v[i][j]-v[i][j-1] <= 10)
b += 50;
}
}
cout << a << ' ' << b << '\n';
return 0;
}
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... |