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 <vector>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
vector <int> arr(9, -100);
int timA=0;
int timB=0;
for (int i=0; i<n; i++){
int a, b, c;
cin>>a>>b>>c;
if(b<=4){
timA+=100;
if((arr[b]+10)>=a){
timA+=50;
}
} else{
timB+=100;
if((arr[b]+10)>=a){
timB+=50;
}
}
arr[b]=a;
}
cout<<timA<<" "<<timB<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |