Fountains CodeForces - 799C 某土豪想要造两座喷泉.现在有 n 个造喷泉的方案,我们已知每个方案的价格以及美观度.有两种合法的货币:金币和钻石.这两种货币之间不能以任何方式转换. 找出一种合法方案使得两座喷泉的美观度和最大. Input 第一行包含 3 个整数 n, c 和 d (2 ≤ n ≤ 100 000, 0 ≤ c, d ≤ 100 000) - 表示造喷泉的方案数,金币的数量和钻石的数量. 之后 n 行描述每一种建造喷泉的方案.每行包含两个整数 bi 和 p…
Problem In a kingdom there are prison cells (numbered 1 to P) built to form a straight line segment. Cells number i and i+1 are adjacent, and prisoners in adjacent cells are called "neighbours." A wall with a window separates adjacent cells, and…
Codeforces1107E 记忆化dp E. Vasya and Binary String Description: Vasya has a string \(s\) of length \(n\) consisting only of digits 0 and 1. Also he has an array \(a\) of length \(n\). Vasya performs the following operation until the string becomes empt…