Submission #84640

#TimeUsernameProblemLanguageResultExecution timeMemory
84640AntonioDakiGo (COCI16_go)C++14
50 / 50
3 ms1048 KiB
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, k, m, ev = 0, evm = 0, evuk = 0; string p, s; cin >> n; for(int i = 1; i <= n; ++i){ cin >> p >>k >> m; while(m - k >= 0){ m -= k - 2; ++ev; } if(ev > evm){ s = p; evm = ev; } evuk += ev; ev = 0; } cout << evuk << endl << s; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...