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 <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
int S = 0;
int C = 0;
int res = 0;
while( N -- ) {
int s, t;
cin >> t >> s;
C ++;
if( S < s ) {
S = s;
res = t + (C - 1) * 20;
}
}
cout << res << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |