이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, mod = 1e9 + 7, base = 31;
int main()
{
int n;
cin >> n;
vector<int> lst(10, -1000);
int a = 0, b = 0;
for (int i = 0; i < n; i++)
{
int t, p1, p2;
cin >> t >> p1 >> p2;
if (p1 <= 4)
a += (100 + (t - lst[p1] <= 10 ? 50 : 0)), lst[p1] = t;
else
b += (100 + (t - lst[p1] <= 10 ? 50 : 0)), lst[p1] = 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... |