# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869770 | Ariadna | Go (COCI16_go) | C++14 | 1 ms | 600 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()
{
int n;
cin >> n;
vector < string > pokemon(n);
vector < int > k(n), m(n);
for (int i = 0; i < n; ++i) {
cin >> pokemon[i] >> k[i] >> m[i];
}
int total = 0, max_evolutions = -1;
string max_evolved;
for (int i = 0; i < n; ++i) {
int ev = m[i] / k[i] + ((2 * (m[i] / k[i]) + (m[i] % k[i])) / k[i]);
if (ev > max_evolutions) {
max_evolutions = ev;
max_evolved = pokemon[i];
}
total += ev;
}
cout << total << '\n' << max_evolved << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |