結果
| 問題 |
No.2044 Infinite Nim
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2022-08-21 01:27:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 172 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 83,456 KB |
| 最終ジャッジ日時 | 2024-10-09 16:42:07 |
| 合計ジャッジ時間 | 3,304 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
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]
# print(xor)
if cnt % 2:
print("First")
else:
if xor:
print("First")
else:
print("Second")
rlangevin