結果

問題 No.361 門松ゲーム2
ユーザー PNJPNJ
提出日時 2023-11-06 05:47:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 406 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 11,792 KB
実行使用メモリ 10,148 KB
最終ジャッジ日時 2023-11-06 05:47:30
合計ジャッジ時間 16,650 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,060 KB
testcase_01 AC 30 ms
10,060 KB
testcase_02 AC 30 ms
10,060 KB
testcase_03 AC 30 ms
10,060 KB
testcase_04 AC 30 ms
10,060 KB
testcase_05 RE -
testcase_06 AC 30 ms
10,060 KB
testcase_07 AC 31 ms
10,060 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 30 ms
10,060 KB
testcase_12 AC 39 ms
10,060 KB
testcase_13 WA -
testcase_14 AC 1,127 ms
10,100 KB
testcase_15 WA -
testcase_16 AC 1,214 ms
10,064 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 948 ms
10,064 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 TLE -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 1,191 ms
10,060 KB
testcase_26 AC 1,244 ms
10,148 KB
testcase_27 AC 1,289 ms
10,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L,D = map(int,input().split())
G = [-1 for i in range(L+1)]
for x in range(6):
  G[x] = 0

for x in range(6,L+1):
  X = set()
  for i in range(L):
    for j in range(i+1,L):
      k = x - i - j
      if j >= k:
        break
      if k - i > D:
        continue
      g = G[i] ^ G[j] ^ G[k]
      X.add(g)
  g = 0
  while g in X:
    g += 1
  G[x] = g

ans = 'kado'
if G[L] == 0:
  ans = 'matsu'
print(ans)
0