이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define oo 1e9
#define pii pair<int, int>
using namespace std;
int lastTime[9];
void solve(){
int n; cin >> n;
for (int i = 0; i < 9; i++)
{
lastTime[i] = -oo;
}
int ans1 = 0;
int ans2 = 0;
for (int i = 0; i < n; i++)
{
int t, a, b; cin >> t >> a >> b;
if(a <= 4) ans1 += 100;
else ans2 += 100;
if(t - lastTime[a] <= 10)
{
if(a <= 4) ans1 += 50;
else ans2 += 50;
}
lastTime[a] = t;
}
cout << ans1 << ' ' << ans2;
}
int main()
{
solve();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |