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 ll long long
int const N=2e5+5;
int const inf=1e9+7;
void solve(){
int n;
cin>>n;
int prev[9];
for (int i = 0; i < 9; ++i)
prev[i]=-inf;
int c1=0,c2=0;
for (int i = 0; i < n; ++i)
{
int t,a,b;
cin>>t>>a>>b;
if(a<=4){
c1+=100;
if(prev[a]+10>=t)
c1+=50;
prev[a]=t;
}
else{
c2+=100;
if(prev[a]+10>=t)
c2+=50;
prev[a]=t;
}
}
cout<<c1<<' '<<c2<<endl;
}
int main(){
int t=1;
// cin>>t;
while(t--)
solve();
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... |