結果
| 問題 |
No.2757 Pin Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-17 21:37:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| コンパイル時間 | 276 ms |
| コンパイル使用メモリ | 82,688 KB |
| 実行使用メモリ | 134,336 KB |
| 最終ジャッジ日時 | 2024-12-20 13:25:33 |
| 合計ジャッジ時間 | 1,969 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 4 WA * 6 |
ソースコード
from collections import deque
def main():
n,k=map(int,input().split())
x=list(map(int,input().split()))
l=deque()
for i in range(len(x)-1):
l.append(x[i+1]-x[i])
cnt=0
while len(l)!=0:
tmp=l.popleft()
if tmp<k:
if len(l)!=0:
l[0]+=tmp
else:
cnt+=1
# cnt+=1
else:
pass
print(n-cnt)
if __name__ == "__main__":
main()