結果

問題 No.946 箱箱箱
ユーザー maspymaspy
提出日時 2020-03-31 16:35:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 485 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 31,056 KB
最終ジャッジ日時 2023-09-07 01:27:09
合計ジャッジ時間 15,406 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
29,872 KB
testcase_01 AC 129 ms
29,824 KB
testcase_02 AC 135 ms
29,972 KB
testcase_03 AC 261 ms
30,920 KB
testcase_04 AC 269 ms
30,792 KB
testcase_05 AC 130 ms
30,000 KB
testcase_06 AC 273 ms
30,796 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 219 ms
30,588 KB
testcase_10 AC 268 ms
30,760 KB
testcase_11 AC 131 ms
29,844 KB
testcase_12 AC 182 ms
30,512 KB
testcase_13 WA -
testcase_14 AC 272 ms
30,796 KB
testcase_15 AC 272 ms
30,716 KB
testcase_16 AC 262 ms
30,780 KB
testcase_17 AC 270 ms
30,716 KB
testcase_18 AC 266 ms
30,780 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 224 ms
30,852 KB
testcase_22 AC 267 ms
30,752 KB
testcase_23 AC 270 ms
30,820 KB
testcase_24 AC 226 ms
30,792 KB
testcase_25 WA -
testcase_26 AC 263 ms
30,796 KB
testcase_27 WA -
testcase_28 AC 261 ms
30,688 KB
testcase_29 AC 273 ms
30,756 KB
testcase_30 WA -
testcase_31 AC 272 ms
30,796 KB
testcase_32 WA -
testcase_33 AC 269 ms
30,916 KB
testcase_34 AC 268 ms
30,684 KB
testcase_35 AC 268 ms
30,956 KB
testcase_36 AC 274 ms
30,652 KB
testcase_37 AC 270 ms
30,604 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 264 ms
30,700 KB
testcase_42 WA -
testcase_43 AC 269 ms
30,812 KB
testcase_44 WA -
testcase_45 AC 268 ms
30,816 KB
testcase_46 AC 267 ms
30,788 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 132 ms
29,880 KB
testcase_52 WA -
testcase_53 AC 128 ms
29,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/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)
0