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<iostream>
#include <algorithm>
#include <vector>
#define ff first
#define ss second
#define piii pair<int, pair<int, int>>
using namespace std;
signed main(){
int n;cin>>n;
vector<piii> li(n);
for(int i=0; i<n; i++){
int a, b, c;cin>>a>>b>>c;
li[i]={a, {b, c}};
}
int ta=0, tb=0;
vector<int> is(9, -10000);
for(int i=0; i<n; i++){
int at=li[i].ff, aa=li[i].ss.ff, ab=li[i].ss.ss;
if(at-10<=is[aa]){
if(aa>4&&ab<5) {tb+=150;is[aa]=at;}
if(aa<5&&ab>4) {ta+=150;is[aa]=at;}
}else{
if(aa>4&&ab<5) {tb+=100;is[aa]=at;}
if(aa<5&&ab>4) {ta+=100;is[aa]=at;}
}
}
cout<<ta<<' '<<tb;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |