結果
問題 |
No.946 箱箱箱
|
ユーザー |
|
提出日時 | 2019-12-09 00:26:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 325 bytes |
コンパイル時間 | 1,198 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 72,064 KB |
最終ジャッジ日時 | 2025-01-02 22:05:44 |
合計ジャッジ時間 | 5,798 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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')