#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 |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Correct |
0 ms |
1088 KB |
Output is correct |
3 |
Correct |
0 ms |
1088 KB |
Output is correct |
4 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |