結果
問題 |
No.361 門松ゲーム2
|
ユーザー |
|
提出日時 | 2021-09-14 02:32:12 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 428 ms / 2,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 82,508 KB |
実行使用メモリ | 76,224 KB |
最終ジャッジ日時 | 2024-06-26 04:46:37 |
合計ジャッジ時間 | 6,054 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
L,D=map(int,input().split()) dp=[0]*(L+1) for i in range(1,L+1): st={10000} for j in range(1,i): for k in range(1,j): l=i-j-k if l==j or l==k: continue if l<=0: continue if max(j,k,l)-min(j,k,l)>D: continue st.add(dp[j]^dp[k]^dp[l]) lt=list(st) list.sort(lt) for j in range(len(lt)): if lt[j]!=j: dp[i]=j break if dp[L]: print('kado') else : print('matsu')