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>
int n, t[100], s[100];
int main() {
scanf("%d", &n);
for (int i=0; i<n; ++i)
scanf("%d%d", t+i, s+i);
int f = 0;
for (int i=1; i<n; ++i)
if (s[f] < s[i])
f = i;
if (s[f] == 0)
puts("0");
else
printf("%d\n", t[f]+f*20);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |