API Response (JSON)
{
"problem": {
"name": "[JRKSJ R5] 1-1 B",
"description": {
"content": "给出一个序列 $a$,$\\forall i\\in [1,n],a_i\\in \\{1,-1\\}$。 询问有多少个将 $a$ 重排后的序列使得该序列的最大子段和最小化。 称两个序列不同,当且仅当这两个序列有任意一个位置上的数不同。",
"description_type": "Markdown"
},
"platform": "Luogu",
"limit": {
"time_limit": 1000,
"memory_limit": 131072
},
"difficulty": {
"LuoguStyle": "P4"
},
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "LGP8848"
},
"statements": [
{
"statement_type": "Markdown",
"content": "给出一个序列 $a$,$\\forall i\\in [1,n],a_i\\in \\{1,-1\\}$。\n\n询问有多少个将 $a$ 重排后的序列使得该序列的最大子段和最小化。\n\n称两个序列不同,当且仅当这两个序列有任意一个位置上的数不同。\n\n## Input\n\n第一行一个整数 $n$。\n\n第二行 $n$ 个整数表示 $a$。\n\n## Output\n\n一个整数表示答案。答案对 $998244353$ 取模。...",
"is_translate": false,
"language": "English"
}
]
}