{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eCon đường từ A đến B có độ dài $$$\\ell$$$, điểm A có toạ độ $$$0$$$ và B có toạ độ $$$\\ell$$$.\u003c/p\u003e\n\u003cp\u003eCó $$$n$$$ biển báo ở trên đường, biển báo thứ $$$i$$$ có giới hạn tốc độ là $$$a_i$$$, tức là mỗi đơn vị toạ độ được phép đi với tốc độ không quá $$$a_i$$$.\u003c/p\u003e\n\u003cp\u003eXem ví dụ dưới đây:\u003c/p\u003e\n\u003ccenter\u003e\n \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/ea1f9c096794e139328bb0162cd91966?v\u003d1684902141\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\" width\u003d\"756px\"\u003e\n\u003c/center\u003e\n\u003cp\u003eTổng thời gian đi là (3-0) x 5 + (4-3) x 8 + (8-4) x 3 + (10-8) x 6 \u003d 47\u003c/p\u003e\n\u003cp\u003eBạn được phép loại bỏ không quá k biển báo ở trên đường (trừ biển báo ở vị trí bắt đầu), tính thời gian ngắn nhất để đi từ A đến B.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eDòng đầu tiên chứa ba số nguyên $$$n$$$, $$$\\ell$$$, $$$k$$$ ($$$1 \\le n \\le 500$$$, $$$1 \\le \\ell \\le 10^5$$$, $$$0 \\le k \\le n-1$$$), lần lượt là số biển báo ở trên đường, độ dài con đường và số biển báo bạn được phép loại bỏ.\u003c/p\u003e\n\u003cp\u003eDòng thứ hai chứa $$$n$$$ số nguyên $$$d_i$$$ ($$$d_1 \u003d 0$$$, $$$d_i \u0026lt; d_{i+1}$$$, $$$0 \\le d_i \\le \\ell - 1$$$) — toạ độ các biển báo.\u003c/p\u003e\n\u003cp\u003eDòng thứ ba chứa $$$n$$$ số nguyên $$$a_i$$$ ($$$1 \\le a_i \\le 10^4$$$) — tốc độ giới hạn.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIn ra thời gian ngắn nhất để đi từ A đến B.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 10 0\n0 3 4 8\n5 8 3 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e47\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}