Submission #9095

#TimeUsernameProblemLanguageResultExecution timeMemory
9095kcm1700Penalty calculation (kriii2_PE)C++14
4 / 4
0 ms1204 KiB
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int main(){ int n; scanf("%d",&n); vector<int> scores; vector<int> times; for(int i = 0; i < n; i++) { int a,b; scanf("%d%d",&a,&b); scores.push_back(b); times.push_back(a); } int ind = max_element(scores.begin(),scores.end()) - scores.begin(); if (scores[ind] == 0){ printf("0\n"); } else { printf("%d\n", ind * 20 + times[ind]); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...