Submission #23058

# Submission time Handle Problem Language Result Execution time Memory
23058 2017-05-02T14:36:09 Z model_code Go (COCI16_go) C++11
25 / 50
0 ms 2020 KB
#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
1 Partially correct 0 ms 2020 KB Partially correct
2 Partially correct 0 ms 2020 KB Partially correct
3 Partially correct 0 ms 2020 KB Partially correct
4 Partially correct 0 ms 2020 KB Partially correct
5 Partially correct 0 ms 2020 KB Partially correct
6 Partially correct 0 ms 2020 KB Partially correct
7 Partially correct 0 ms 2020 KB Partially correct
8 Partially correct 0 ms 2020 KB Partially correct
9 Partially correct 0 ms 2020 KB Partially correct
10 Partially correct 0 ms 2020 KB Partially correct
11 Partially correct 0 ms 2020 KB Partially correct
12 Partially correct 0 ms 2020 KB Partially correct
13 Partially correct 0 ms 2020 KB Partially correct
14 Partially correct 0 ms 2020 KB Partially correct
15 Partially correct 0 ms 2020 KB Partially correct
16 Partially correct 0 ms 2020 KB Partially correct
17 Partially correct 0 ms 2020 KB Partially correct
18 Partially correct 0 ms 2020 KB Partially correct
19 Partially correct 0 ms 2020 KB Partially correct
20 Partially correct 0 ms 2020 KB Partially correct
21 Partially correct 0 ms 2020 KB Partially correct
22 Partially correct 0 ms 2020 KB Partially correct
23 Partially correct 0 ms 2020 KB Partially correct
24 Partially correct 0 ms 2020 KB Partially correct
25 Partially correct 0 ms 2020 KB Partially correct