結果

問題 No.946 箱箱箱
ユーザー pekempeypekempey
提出日時 2019-12-09 01:20:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 229 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 769 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 79,360 KB
最終ジャッジ日時 2023-09-09 09:54:39
合計ジャッジ時間 12,907 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
72,112 KB
testcase_01 AC 90 ms
71,992 KB
testcase_02 AC 88 ms
72,196 KB
testcase_03 AC 229 ms
78,968 KB
testcase_04 AC 212 ms
78,780 KB
testcase_05 AC 89 ms
71,880 KB
testcase_06 AC 214 ms
78,784 KB
testcase_07 AC 213 ms
78,952 KB
testcase_08 AC 213 ms
78,852 KB
testcase_09 AC 216 ms
78,648 KB
testcase_10 AC 217 ms
79,168 KB
testcase_11 AC 90 ms
71,688 KB
testcase_12 AC 218 ms
79,068 KB
testcase_13 AC 209 ms
78,844 KB
testcase_14 AC 212 ms
79,024 KB
testcase_15 AC 215 ms
79,040 KB
testcase_16 AC 211 ms
79,180 KB
testcase_17 AC 215 ms
79,176 KB
testcase_18 AC 210 ms
78,800 KB
testcase_19 AC 215 ms
79,024 KB
testcase_20 AC 94 ms
76,852 KB
testcase_21 AC 205 ms
79,268 KB
testcase_22 AC 211 ms
79,120 KB
testcase_23 AC 217 ms
78,700 KB
testcase_24 AC 204 ms
78,904 KB
testcase_25 AC 215 ms
78,804 KB
testcase_26 AC 211 ms
79,044 KB
testcase_27 AC 212 ms
79,292 KB
testcase_28 AC 222 ms
79,152 KB
testcase_29 AC 212 ms
79,360 KB
testcase_30 AC 213 ms
79,116 KB
testcase_31 AC 217 ms
79,328 KB
testcase_32 AC 211 ms
79,048 KB
testcase_33 AC 212 ms
79,144 KB
testcase_34 AC 212 ms
78,968 KB
testcase_35 AC 212 ms
79,176 KB
testcase_36 AC 211 ms
78,904 KB
testcase_37 AC 218 ms
78,888 KB
testcase_38 AC 214 ms
78,744 KB
testcase_39 AC 213 ms
78,832 KB
testcase_40 AC 208 ms
78,852 KB
testcase_41 AC 208 ms
78,900 KB
testcase_42 AC 214 ms
78,984 KB
testcase_43 AC 214 ms
78,508 KB
testcase_44 AC 214 ms
78,844 KB
testcase_45 AC 215 ms
78,832 KB
testcase_46 AC 216 ms
78,888 KB
testcase_47 AC 90 ms
71,700 KB
testcase_48 AC 88 ms
71,876 KB
testcase_49 AC 89 ms
72,092 KB
testcase_50 AC 91 ms
71,676 KB
testcase_51 AC 89 ms
72,148 KB
testcase_52 AC 88 ms
71,876 KB
testcase_53 AC 89 ms
72,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

N = int(input())
A = []
for i in range(N):
  A.append(int(input()))

g = [0] * (N + 1)
for i in reversed(range(N)):
  s = set()
  x = 0
  for j in range(i, N):
    x ^= A[j]
    s.add(x ^ g[j + 1])
  while g[i] in s:
    g[i] += 1

print('Takahashi' if g[0] != 0 else 'Takanashi')
0