122012024-12-09 11:23:06CsongiFarmula 1cpp17Accepted 100/1006ms444 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    const vector<int> pontok = {-1, 25,18,15,12,10,8,6,4,2,1,0,0,0,0,0,0,0,0,0,0};
    int n; cin >> n;

    for (int i = 0; i < n; i++)
    {
        int futam; cin >> futam;
        int Dani = 0, ellenfel = 0;
        for (int i = 0; i < futam; i++)
        {
            int helyezes; cin >> helyezes;
            Dani += pontok[helyezes];
            if (helyezes == 1)
            {
                ellenfel += pontok[helyezes+1];
            }
            else
            {
                ellenfel += pontok[1];
            }
        }

        if (Dani >= ellenfel)
        {
            cout << "Champion" << endl;
        }
        else
        {
            cout << "Practice harder" << endl;
        }
        
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms320 KiB
subtask220/20
2Accepted2ms320 KiB
3Accepted3ms432 KiB
subtask320/20
4Accepted6ms428 KiB
5Accepted6ms320 KiB
6Accepted6ms320 KiB
7Accepted4ms320 KiB
subtask460/60
8Accepted6ms320 KiB
9Accepted6ms436 KiB
10Accepted6ms444 KiB
11Accepted4ms320 KiB