이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);
typedef long long ll;
#define f first
#define s second
#define MAXN 100005
int last[9];
int main() {
memset(last, -1, sizeof(last));
fast
int n;
cin >> n;
int pnt1 = 0, pnt2 = 0;
for (int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
if (last[a] != -1 && last[a] + 10 >= t) {
if (a <= 4) {
pnt1 += 150;
last[a] = t;
} else {
pnt2 += 150;
last[a] = t;
}
} else {
if (a <= 4) {
pnt1 += 100;
last[a] = t;
} else {
pnt2 += 100;
last[a] = t;
}
}
}
cout << pnt1 << " " << pnt2 << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |