This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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... |