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>
#define int int64_t
#define ll int128_t
using namespace std;
int32_t main()
{
int T,sayp=0,sayg=0;
cin>>T;
vector<int>say(9,-11);
while(T--){
int t,r,s;
cin>>t>>r>>s;
if(r<5 && s<5){
continue;
}
if(r>4 && s>4){
continue;
}
if(r<5){
sayp+=100;
if(t-say[r]<=10){
sayp+=50;
}
say[r]=t;
}
else{
sayg+=100;
if(t-say[r]<=10){
sayg+=50;
}
say[r]=t;
}
}
cout<<sayp<<" "<<sayg;
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... |