답안 #869770

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
869770 2023-11-05T15:30:51 Z Ariadna Go (COCI16_go) C++14
36 / 50
1 ms 600 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 600 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Partially correct 0 ms 344 KB Partially correct
13 Partially correct 0 ms 348 KB Partially correct
14 Partially correct 1 ms 348 KB Partially correct
15 Correct 0 ms 348 KB Output is correct
16 Partially correct 0 ms 348 KB Partially correct
17 Incorrect 0 ms 348 KB Output isn't correct
18 Partially correct 0 ms 348 KB Partially correct
19 Partially correct 0 ms 348 KB Partially correct
20 Partially correct 0 ms 348 KB Partially correct
21 Partially correct 0 ms 348 KB Partially correct
22 Partially correct 0 ms 348 KB Partially correct
23 Partially correct 0 ms 348 KB Partially correct
24 Partially correct 0 ms 348 KB Partially correct
25 Partially correct 0 ms 348 KB Partially correct