Submission #51014155


Source Code Expand

#include <iostream>
#include <vector>
using namespace std;

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

	for (int t = 0; t < T; t++) {
		int N; cin >> N;
		int min = 1000000000;
		int cnt = 0;

		vector<int> A(N);
		for (int i = 0; i < N; i++) {
			cin >> A[i];
			if (A[i] < min) min = A[i];
		}

		for (int i = 0; i < N; i++) {
			if (A[i] == min) cnt++;
		}

		if (N%2 == 1) cout << "First" << endl;
		else {
			if ((N-cnt)%2 == 1) cout << "First" << endl;
			else cout << "Second" << endl;
		}
	}
	return 0;
}

Submission Info

Submission Time
Task G - Min Nim
User integral
Language C++ 20 (gcc 12.2)
Score 100
Code Size 532 Byte
Status AC
Exec Time 28 ms
Memory 3756 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 1
AC × 22
Set Name Test Cases
Sample 00_sample_01
All 00_sample_01, 01_random-small_01, 01_random-small_02, 01_random-small_03, 01_random-small_04, 01_random-small_05, 02_random-max_01, 02_random-max_02, 02_random-max_03, 02_random-max_04, 02_random-max_05, 02_random-max_06, 02_random-max_07, 02_random-max_08, 02_random-max_09, 02_random-max_10, 03_handmade_1, 03_handmade_2, 03_handmade_3, 03_handmade_4, 03_handmade_5, 03_handmade_6
Case Name Status Exec Time Memory
00_sample_01 AC 1 ms 3480 KiB
01_random-small_01 AC 27 ms 3464 KiB
01_random-small_02 AC 27 ms 3464 KiB
01_random-small_03 AC 26 ms 3456 KiB
01_random-small_04 AC 28 ms 3448 KiB
01_random-small_05 AC 27 ms 3548 KiB
02_random-max_01 AC 8 ms 3648 KiB
02_random-max_02 AC 23 ms 3448 KiB
02_random-max_03 AC 15 ms 3444 KiB
02_random-max_04 AC 24 ms 3540 KiB
02_random-max_05 AC 19 ms 3340 KiB
02_random-max_06 AC 13 ms 3476 KiB
02_random-max_07 AC 14 ms 3460 KiB
02_random-max_08 AC 20 ms 3404 KiB
02_random-max_09 AC 22 ms 3548 KiB
02_random-max_10 AC 4 ms 3508 KiB
03_handmade_1 AC 25 ms 3756 KiB
03_handmade_2 AC 23 ms 3688 KiB
03_handmade_3 AC 13 ms 3532 KiB
03_handmade_4 AC 11 ms 3400 KiB
03_handmade_5 AC 14 ms 3480 KiB
03_handmade_6 AC 1 ms 3464 KiB