結果
| 問題 | No.946 箱箱箱 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-09 00:26:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 72,064 KB |
| 最終ジャッジ日時 | 2026-06-06 08:04:02 |
| 合計ジャッジ時間 | 7,769 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 23 |
ソースコード
N = int(input())
A = []
for i in range(N):
A.append(int(input()))
dp = [False] * (N + 1) # 0
for i in reversed(range(N)):
x = 0
for j in range(i, N):
x ^= A[j]
if x == 0:
if not dp[j+1]:
dp[i] = True
else:
if dp[j+1]:
dp[i] = True
print('Takahashi' if dp[0] else 'Takanashi')