Submission #238554

#TimeUsernameProblemLanguageResultExecution timeMemory
238554marlicuGo (COCI16_go)C++14
50 / 50
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; int ukupno; int maks; string ime; void pokemon() { string p; int k, m; cin >> p; cin >> k >> m; int puta = 0; while (m >= k) { m -= k; m += 2; puta++; } ukupno += puta; if (puta > maks) { maks = puta; ime = p; } } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; while (n--) { pokemon(); } cout << ukupno << '\n'; cout << ime; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...