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>
int main(){
int T[101], S[101];
int i, N, P=0, maxIndex=0, maxS=0;
scanf("%d", &N);
for(i=0; i < N; ++i){
scanf("%d %d", &T[i], &S[i]);
if(S[i] > maxS){
maxIndex = i+1;
maxS = T[i];
}
}
P = maxIndex < 1 ? 0 : maxS + (maxIndex-1)*20;
printf("%d", P);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |