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>
using namespace std;
#define int long long
#define fi first
#define se second
int bef[10];
signed main(){
int n; cin >> n;
for(int i = 1; i <= 8; i++)bef[i] = -1e9;
int elang = 0, bebek = 0;
for(int i = 1; i <= n; i++){
int t,a,b; cin >> t >> a >> b;
if(a <= 4)elang += 100;
else bebek += 100;
if(t - bef[a] <= 10){
if(a <= 4)elang += 50;
else bebek += 50;
}
bef[a] = t;
}
cout << elang << " " << bebek;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |