# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
23057 | model_code | Go (COCI16_go) | C++11 | 0 ms | 2020 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |