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