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;
typedef long long ll;
int main() {
int n; cin>>n;
vector<int> score(2, 0);
vector<int> prev_t(8, -1);
while (n--) {
int t,a,b; cin>>t>>a>>b;
if (a<=4) {
score[0]+=100;
} else {
score[1]+=100;
}
if (prev_t[a]==-1) prev_t[a]=t;
else {
if (t-prev_t[a]<=10) {
if (a<=4) score[0]+=50;
else score[1]+=50;
}
prev_t[a]=t;
}
}
cout<<score[0]<<" "<<score[1];
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... |