Submission #9019

#TimeUsernameProblemLanguageResultExecution timeMemory
9019joonasPenalty calculation (kriii2_PE)C++98
0 / 4
0 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...