# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23058 | model_code | Go (COCI16_go) | C++11 | 0 ms | 2020 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 <iostream>
using namespace std;
const int MAX_POKEMON = 70;
struct Pokemon{
string name;
int candyReq;
int candyNo;
};
int n;
int maks, maksi;
int totalEvolution;
int evolutionNo[MAX_POKEMON];
Pokemon p[MAX_POKEMON];
int main (void){
cin >> n;
for (int i=0;i<n;i++){
cin >> p[i].name;
cin >> p[i].candyReq >> p[i].candyNo;
while ( p[i].candyNo >= p[i].candyReq ){
p[i].candyNo -= p[i].candyReq;
p[i].candyNo += 2;
evolutionNo[i]++;
totalEvolution++;
}
if ( evolutionNo[i] > maks ){
maks=evolutionNo[i];
maksi=i;
}
}
cout << totalEvolution << endl;
cout << p[maksi].name + "z" << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |