120772024-11-30 10:54:22DávidFarmula 1cpp17Accepted 100/10012ms508 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin >> t;

	int pontok[] = {0, 25, 18, 15, 12, 10, 8, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

	for(int o = 0; o < t; o++) {
		int n;
		cin >> n;

		int dani = 0;
		int ellenfel = 0;

		for(int i = 0; i < n; i++) {
			int helyezes;
			cin >> helyezes;
			dani += pontok[helyezes];
			ellenfel += helyezes == 1 ? pontok[2] : pontok[1];
		}

		cout << (dani >= ellenfel ? "Champion" : "Practice harder") << endl;
	}
	
	return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms320 KiB
subtask220/20
2Accepted3ms412 KiB
3Accepted3ms416 KiB
subtask320/20
4Accepted12ms320 KiB
5Accepted10ms320 KiB
6Accepted10ms408 KiB
7Accepted7ms412 KiB
subtask460/60
8Accepted12ms508 KiB
9Accepted12ms320 KiB
10Accepted12ms320 KiB
11Accepted7ms412 KiB