Submission #86193

#TimeUsernameProblemLanguageResultExecution timeMemory
86193MatesV13Go (COCI16_go)C++11
50 / 50
3 ms708 KiB
#include <bits/stdc++.h> using namespace std; long long n, k, m, ci, cmax, cu; string namei, namemax; int main (){ ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i=0;i<n;i++){ cin >> namei; cin >> k >> m; while (m >= k){ m = m - k + 2; ci++; } if (ci > cmax){ cmax = ci; namemax = namei; } cu = cu + ci; ci = 0; } cout << cu << endl << namemax; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...