API Response (JSON)
{
"problem": {
"name": "[GESP202406 四级] 宝箱",
"description": {
"content": "小杨发现了 $n$ 个宝箱,其中第 $i$ 个宝箱的价值是 $a_i$。 小杨可以选择一些宝箱放入背包并带走,但是小杨的背包比较特殊,假设小杨选择的宝箱中最大价值为 $x$,最小价值为 $y$,小杨需要保证 $x-y\\leq k$,否则小杨的背包会损坏。 小杨想知道背包不损坏的情况下,自己能够带走宝箱的总价值最大是多少。",
"description_type": "Markdown"
},
"platform": "Luogu",
"limit": {
"time_limit": 1000,
"memory_limit": 524288
},
"difficulty": {
"LuoguStyle": "P2"
},
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "LGB4006"
},
"statements": [
{
"statement_type": "Markdown",
"content": "小杨发现了 $n$ 个宝箱,其中第 $i$ 个宝箱的价值是 $a_i$。\n\n小杨可以选择一些宝箱放入背包并带走,但是小杨的背包比较特殊,假设小杨选择的宝箱中最大价值为 $x$,最小价值为 $y$,小杨需要保证 $x-y\\leq k$,否则小杨的背包会损坏。\n\n小杨想知道背包不损坏的情况下,自己能够带走宝箱的总价值最大是多少。\n\n## Input\n\n第一行包含两个正整数 $n,k$,含义如题面所示。...",
"is_translate": false,
"language": "English"
}
]
}