{"problem":{"name":"034. Broken Ladder","description":{"content":"You have a broken ladder. Your ladder would normally have $n$ rungs numbered from 1 to $n$, but unfortunately some of the rungs have broken off. You can only climb up the ladder if the minimum gap bet","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269034"},"statements":[{"statement_type":"Markdown","content":"You have a broken ladder. Your ladder would normally have $n$ rungs numbered from 1 to $n$, but unfortunately some of the rungs have broken off. You can only climb up the ladder if the minimum gap between rungs is less than or equal to some value $k$. For example, if $k$ = 1, if the ladder was broken at all, you would not be able to climb the ladder.\n\nThe first line of input contains two space-separated positive integers _n_ and _k_: the number of rungs remaining on the ladder, and the largest gap in rungs that you can climb over, respectively. The second line of input contains a sorted list of $n$ integers greater than or equal to 1: the positions of the rungs of the ladder. *You can assume that the first and last rungs of the ladder are not broken.*\n\nOutput \"YES\" if you can still climb the broken ladder, otherwise \"NO\". (no quotes)\n\n## Input\n\nThe first line of input contains two space-separated positive integers _n_ and _k_: the number of rungs remaining on the ladder, and the largest gap in rungs that you can climb over, respectively. The second line of input contains a sorted list of $n$ integers greater than or equal to 1: the positions of the rungs of the ladder. *You can assume that the first and last rungs of the ladder are not broken.*\n\n## Output\n\nOutput \"YES\" if you can still climb the broken ladder, otherwise \"NO\". (no quotes)\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of remaining rungs.  \nLet $ k \\in \\mathbb{Z}^+ $ be the maximum allowable gap between consecutive rungs.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a strictly increasing sequence of positive integers representing the positions of the remaining rungs, with $ a_1 = 1 $ and $ a_n $ being the top rung.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ 1 \\leq k \\leq 100 $  \n3. $ 1 = a_1 < a_2 < \\dots < a_n \\leq 100 $  \n\n**Objective**  \nDetermine whether $ \\max_{1 \\leq i < n} (a_{i+1} - a_i) \\leq k $.  \nIf true, output \"YES\"; otherwise, output \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269034","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}