結果
問題 |
No.2402 Dirty Stairs and Shoes
|
ユーザー |
|
提出日時 | 2023-10-29 12:39:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 410 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 28,464 KB |
最終ジャッジ日時 | 2024-09-25 16:41:02 |
合計ジャッジ時間 | 3,754 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | TLE * 1 -- * 31 |
ソースコード
n,k=map(int,input().split()) d=int(input()) d_list=list(map(int,input().split())) c=int(input()) c_list=list(map(int,input().split())) dp=[False]*(n+1) dp[0]=True for i in range(n+1): if i <=k: if i in d_list: dp[i]=False else: dp[i]=True else: if i in d_list: dp[i]=False elif i in c_list: dp[i]=True else: for j in range(1,k+1): if dp[i-j]==True: dp[i]=True print(dp)