結果
問題 | No.946 箱箱箱 |
ユーザー |
👑 |
提出日時 | 2023-12-31 04:19:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 206 ms / 2,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 82,596 KB |
実行使用メモリ | 77,528 KB |
最終ジャッジ日時 | 2024-09-27 17:01:29 |
合計ジャッジ時間 | 9,776 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 51 |
ソースコード
n = int(input())A = [int(input()) for _ in range(n)]G = [0] * (n + 1)for i in range(n - 1, -1, -1):se = set()x = A[i]for j in range(i + 1, n):se.add(x ^ G[j])x ^= A[j]se.add(x)mex = 0while mex in se:mex += 1G[i] = mexif G[0] == 0:print("Takanashi")else:print("Takahashi")