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