이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
void test_case() {
int n;
cin >> n;
int s1 = 0, s2 = 0;
vector<int> last(9, -INF);
for (int i = 1; i <= n; ++i) {
int t, a, b;
cin >> t >> a >> b;
if (a <= 4) {
s1 += 100;
if (t - last[a] <= 10) {
s1 += 50;
}
} else {
s2 += 100;
if (t - last[a] <= 10) {
s2 += 50;
}
}
last[a] = t;
}
cout << s1 << ' ' << s2 << '\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1;
for (int tc = 1; tc <= t; ++tc) {
test_case();
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |