# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397492 | Alma | Go (COCI16_go) | C++17 | 1 ms | 316 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int n, k, m, evo, ans = 0;
string name;
pair<int, string> maxPoke = {0, "0"};
cin >> n;
while (n--) {
cin >> name >> k >> m;
evo = 0;
while (m >= k) {
evo += m/k;
m = m%k + (m/k)*2;
}
if (evo > maxPoke.first) maxPoke = make_pair(evo, name);
ans += evo;
}
cout << ans << '\n' << maxPoke.second << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |