結果
問題 |
No.2402 Dirty Stairs and Shoes
|
ユーザー |
|
提出日時 | 2023-08-04 21:49:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 82,396 KB |
実行使用メモリ | 96,292 KB |
最終ジャッジ日時 | 2024-12-20 02:38:46 |
合計ジャッジ時間 | 2,895 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 32 |
ソースコード
n,k=map(int,input().split()) a=int(input()) A=list(map(int,input().split())) b=int(input()) B=list(map(int,input().split())) N=[0]*(n+1) N[-1]=1 N=N+[-1]*k for i in B: N[i]=2 for i in A: N[i]=-1 for i in reversed(range(n)): if N[i+1]==1 or N[i+k]==1: if N[i]==2: print("Yes") #print(N) exit() if N[i]==0: N[i]=1 print("No")