API Response (JSON)
{
"problem": {
"name": "E. Buy Low Sell High",
"description": {
"content": "You can perfectly predict the price of a certain stock for the next _N_ days. You would like to profit on this knowledge, but only want to transact one share of stock per day. That is, each day you wi",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF867E"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You can perfectly predict the price of a certain stock for the next _N_ days. You would like to profit on this knowledge, but only want to transact one share of stock per day. That is, each day you wi...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "你可以完美预测某只股票在未来 #cf_span[N] 天内的价格。你希望利用这一知识获利,但每天最多只能交易一股股票。也就是说,每天你只能选择买入一股、卖出一股,或不进行任何操作。初始时你拥有零股,且在没有股票时不能卖出。在第 #cf_span[N] 天结束时,你希望再次拥有零股,但希望拥有尽可能多的钱。\n\n输入的第一行为一个整数 #cf_span[N] #cf_span[(2 ≤ N ≤ 3·1...",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "**Definitions** \nLet $ N \\in \\mathbb{Z} $ be the number of days, with $ 2 \\leq N \\leq 3 \\cdot 10^5 $. \nLet $ P = (p_1, p_2, \\dots, p_N) $ be the sequence of stock prices, where $ p_i \\in \\mathbb{Z} ...",
"is_translate": false,
"language": "Formal"
}
]
}