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 <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
scanf("%d",&n);
vector<int> scores;
vector<int> times;
for(int i = 0; i < n; i++) {
int a,b;
scanf("%d%d",&a,&b);
scores.push_back(b);
times.push_back(a);
}
int ind = max_element(scores.begin(),scores.end()) - scores.begin();
if (scores[ind] == 0){
printf("0\n");
} else {
printf("%d\n", ind * 20 + times[ind]);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |