結果
問題 |
No.2044 Infinite Nim
|
ユーザー |
![]() |
提出日時 | 2022-08-21 01:14:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 857 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 83,968 KB |
最終ジャッジ日時 | 2024-10-09 16:34:41 |
合計ジャッジ時間 | 3,889 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 15 |
ソースコード
N = int(input()) A = list(map(int, input().split())) cnt = 0 xor = 0 for i in range(N): if A[i] == -1: cnt += 1 else: xor ^= A[i] if xor: if cnt % 2: print("First") else: print("Second") else: print("Second")