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