結果

問題 No.3090 NimNim
ユーザー sasa8uyauya
提出日時 2025-04-05 00:43:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 82,528 KB
実行使用メモリ 104,240 KB
最終ジャッジ日時 2025-04-05 00:43:05
合計ジャッジ時間 4,140 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
a=list(map(int,input().split()))
ga=0
for v in a:
	ga^=v
b=list(map(int,input().split()))
gb=0
for v in b:
	gb^=v
if max(a)==1:
	print(["First","Second"][n%2==1 and gb==0])
else:
	print(["Second","First"][ga>0])
0