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 endl '\n'
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define sz(x) ((int)(x).size())
void solve(){
int n;
cin >> n;
int c1=0,c2=0;
int last[9];
fill(last,last+9,-1000);
for(int i=1;i<=n;i++){
int t,a,b;
cin >> t >> a >> b;
if(a<=4){
c1+=100;
if(t-last[a]<=10) c1+=50;
last[a]=t;
}
else{
c2+=100;
if(t-last[a]<=10) c2+=50;
last[a]=t;
}
}
cout << c1 << " " << c2 << endl;
}
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;//cin >> t;
while(t--) solve();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |