Submission #25462091


Source Code Expand

Copy
#include<stdio.h>
#include<map>
using namespace std;
int T,n;
map<int,int>mp;
int main(){
scanf("%d",&T);
while(T--){
scanf("%d",&n);
mp.clear();
for(int i=1;i<=n;i++){
int x;
scanf("%d",&x),mp[x]++;
}
if(n&1){
puts("Second");
continue;
}
int flg=0;
for(map<int,int>::iterator it=mp.begin();it!=mp.end();it++)
flg|=((it->second)&1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<stdio.h>
#include<map>
using namespace std;
int T,n;
map<int,int>mp;
int main(){
	scanf("%d",&T);
	while(T--){
		scanf("%d",&n);
		mp.clear();
		for(int i=1;i<=n;i++){
			int x;
			scanf("%d",&x),mp[x]++;
		}
		if(n&1){
			puts("Second");
			continue;
		}
		int flg=0;
		for(map<int,int>::iterator it=mp.begin();it!=mp.end();it++)
			flg|=((it->second)&1);
		puts(flg==0? "Second":"First");
	}
	return 0;
}

Submission Info

Submission Time
Task D - Let's Play Nim
User xiaoziyao
Language C++ (Clang 10.0.0)
Score 600
Code Size 441 Byte
Status AC
Exec Time 95 ms
Memory 7824 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
AC × 1
AC × 51
Set Name Test Cases
Sample sample_01.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt, random_30.txt, random_31.txt, random_32.txt, random_33.txt, random_34.txt, random_35.txt, random_36.txt, random_37.txt, random_38.txt, random_39.txt, random_40.txt, random_41.txt, random_42.txt, random_43.txt, random_44.txt, random_45.txt, random_46.txt, random_47.txt, random_48.txt, random_49.txt, random_50.txt, sample_01.txt
Case Name Status Exec Time Memory
random_01.txt AC 91 ms 7648 KB
random_02.txt AC 95 ms 7824 KB
random_03.txt AC 71 ms 5476 KB
random_04.txt AC 14 ms 2880 KB
random_05.txt AC 41 ms 3836 KB
random_06.txt AC 36 ms 4080 KB
random_07.txt AC 45 ms 4396 KB
random_08.txt AC 51 ms 5040 KB
random_09.txt AC 44 ms 4604 KB
random_10.txt AC 41 ms 4020 KB
random_11.txt AC 42 ms 5100 KB
random_12.txt AC 38 ms 4740 KB
random_13.txt AC 44 ms 4800 KB
random_14.txt AC 52 ms 4952 KB
random_15.txt AC 56 ms 4740 KB
random_16.txt AC 45 ms 4652 KB
random_17.txt AC 48 ms 4820 KB
random_18.txt AC 68 ms 5192 KB
random_19.txt AC 42 ms 5168 KB
random_20.txt AC 46 ms 4520 KB
random_21.txt AC 31 ms 2972 KB
random_22.txt AC 29 ms 3228 KB
random_23.txt AC 34 ms 3224 KB
random_24.txt AC 32 ms 3060 KB
random_25.txt AC 33 ms 3224 KB
random_26.txt AC 34 ms 3232 KB
random_27.txt AC 29 ms 2956 KB
random_28.txt AC 34 ms 3224 KB
random_29.txt AC 33 ms 3088 KB
random_30.txt AC 30 ms 2968 KB
random_31.txt AC 31 ms 2996 KB
random_32.txt AC 32 ms 3140 KB
random_33.txt AC 28 ms 3144 KB
random_34.txt AC 33 ms 2976 KB
random_35.txt AC 29 ms 3144 KB
random_36.txt AC 25 ms 3000 KB
random_37.txt AC 30 ms 3104 KB
random_38.txt AC 31 ms 3148 KB
random_39.txt AC 28 ms 3020 KB
random_40.txt AC 32 ms 2984 KB
random_41.txt AC 33 ms 3136 KB
random_42.txt AC 33 ms 2972 KB
random_43.txt AC 28 ms 3000 KB
random_44.txt AC 32 ms 3136 KB
random_45.txt AC 31 ms 3000 KB
random_46.txt AC 27 ms 3136 KB
random_47.txt AC 26 ms 3036 KB
random_48.txt AC 32 ms 2996 KB
random_49.txt AC 29 ms 3136 KB
random_50.txt AC 28 ms 3024 KB
sample_01.txt AC 2 ms 3140 KB


2025-04-06 (Sun)
05:13:30 +00:00