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 ff first
#define ss second
#define pb push_back
const int N=3e5+5;
int t[N],a[N],b[N];
signed main(){
int n;
cin>>n;
t[0]=-20;
int p=0,k=0;
for(int i=1;i<=n;i++){
cin>>t[i]>>a[i]>>b[i];
if(a[i]<=4){
if(t[i]-t[i-1]<=10 and a[i]==a[i-1]){
k+=150;
}
else{
k+=100;
}
}
else{
if(t[i]-t[i-1]<=10 and a[i]==a[i-1]){
p+=150;
}
else{
p+=100;
}
}
}
cout<<k<<" "<<p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |