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