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;
using ll = long long;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);
int n;
cin >> n;
vector <int> v[9];
for(int i = 0;i < n;i++){
int t,a,b;
cin >> t >> a >> b;
v[a].push_back(t);
}
int res1 = 0;
int res2 = 0;
int last = -100;
for(int i = 1;i <= 4;i++){
for(int j : v[i]){
if(j - 10 <= last){
res1 += 50;
}
res1 += 100;
last = j;
}
last = -100;
}
for(int i = 5;i <= 8;i++){
for(int j : v[i]){
if(j - 10 <= last){
res2 += 50;
}
res2 += 100;
last = j;
}
last = -100;
}
cout << res1 << " " << res2 << "\n";
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... |