API Response (JSON)
{
"problem": {
"name": "【MX-X1-T3】「KDOI-05」简单的序列问题",
"description": {
"content": "给出一个长度为 $n$ 的序列 $a$。定义其前缀和数组 $b_i=\\sum_{j=1}^ia_j$。定义其权值 $S=\\sum_{i=1}^n(b_i\\bmod 2)$。 你可以对序列 $a$ 进行若干次如下操作: * 交换 $a_i,a_j$,花费 $c_i+c_j$ 元,其中 $c$ 为给定序列; 对于 $i=0\\sim n$,求使得 $S=i$ 的最少钱数。如果不可能,输出 $-1$",
"description_type": "Markdown"
},
"platform": "Luogu",
"limit": {
"time_limit": 2000,
"memory_limit": 524288
},
"difficulty": {
"LuoguStyle": "P4"
},
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "LGP10715"
},
"statements": [
{
"statement_type": "Markdown",
"content": "给出一个长度为 $n$ 的序列 $a$。定义其前缀和数组 $b_i=\\sum_{j=1}^ia_j$。定义其权值 $S=\\sum_{i=1}^n(b_i\\bmod 2)$。\n\n你可以对序列 $a$ 进行若干次如下操作:\n\n* 交换 $a_i,a_j$,花费 $c_i+c_j$ 元,其中 $c$ 为给定序列;\n\n对于 $i=0\\sim n$,求使得 $S=i$ 的最少钱数。如果不可能,输出 $-1$...",
"is_translate": false,
"language": "English"
}
]
}