結果
| 問題 | No.946 箱箱箱 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-03-31 16:35:49 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 435 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 41,580 KB |
| 最終ジャッジ日時 | 2026-03-11 00:22:28 |
| 合計ジャッジ時間 | 40,270 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 WA * 19 |
ソースコード
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N, *A = map(int, read().split())
dp = np.zeros(N + 1, np.int32)
for i, x in enumerate(A[::-1]):
dp[:i + 1] ^= x
values = np.unique(dp[: i + 1])
n = len(values)
ind = np.where(np.arange(n) != values)[0]
dp[i + 1] = n if not len(ind) else ind[0]
answer = 'Takanashi' if dp[0] else 'Takahashi'
print(answer)
maspy