結果
| 問題 |
No.361 門松ゲーム2
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2020-09-26 03:09:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 497 bytes |
| コンパイル時間 | 119 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,696 KB |
| 最終ジャッジ日時 | 2024-06-28 12:05:44 |
| 合計ジャッジ時間 | 7,576 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 TLE * 2 -- * 11 |
ソースコード
import sys
read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
readlines=sys.stdin.buffer.readlines
l, d=map(int, readline().split())
g=[0]*(l+1)
for x in range(1, l+1):
st=set()
for a in range(1, x):
for b in range(1, a):
c=x-a-b
if 0<c and c<b and a-c<=d:
st.add(g[a]^g[b]^g[c])
i=0
while True:
if i not in st:
g[x]=i
break
i+=1
if g[l]:
print("kado")
else:
print("matsu")
chocorusk