結果
| 問題 |
No.2044 Infinite Nim
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-08-19 21:36:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 285 bytes |
| コンパイル時間 | 379 ms |
| コンパイル使用メモリ | 82,540 KB |
| 実行使用メモリ | 83,480 KB |
| 最終ジャッジ日時 | 2024-10-09 06:01:54 |
| 合計ジャッジ時間 | 3,369 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
def solve():
N=int(input())
A=list(map(int,input().split()))
fin_grundy=0; inf_count=0
for a in A:
if a==-1:
inf_count+=1
else:
fin_grundy^=a
return (fin_grundy!=0)|(inf_count%2==1)
print("First" if solve() else "Second")
Kazun