codeforces
_北鸣
If I could, I surely would.
展开
-
codeforces Manthan, Codefest 17 B.Marvolo Gaunt's Ring (简单dp)
题目链接: B.Marvolo Gaunt’s Ring 题意: 给出n, p, q, r 给出n个数, a[i] 求p * a[i] + q * a[j] + r * [k] 的最大值 ( 1<=i<=j<=k<=n) 解法: 限制条件i<=j<=k p*a[i] => 作为起点 q*a[j] => 与 max( p * a[i] ) (i<=j) 相加 r*a[k] => 与 max (原创 2017-09-28 10:53:58 · 346 阅读 · 0 评论 -
2015-2016 Northwestern European Regional Contest (NWERC 2015) E. Elementary Math
题目链接: 2015-2016 Northwestern European Regional Contest (NWERC 2015) E. Elementary Math 题意: 给定n, 以及n对(a, b), 每对(a, b) 均有三个操作(a*b, a+b, a-b). 给每一对选择一个操作使得任意两对的计算结果均不相同. 解析: 求离散化后,建边(将(a,b)原创 2017-09-28 12:20:38 · 426 阅读 · 0 评论