
STL
文章平均质量分 71
Megumin
这个作者很懒,什么都没留下…
展开
-
CodeForces702B Powers of Two
You are given n integers a1, a2, ..., an. Find the number of pairs of indexes i, j (i Input The first line contains the single positive integer n (1 ≤ n ≤ 105) — the number of integers. The second原创 2016-07-30 21:05:41 · 458 阅读 · 0 评论 -
NYOJ55 懒省事的小明
描述 小明很想吃果子,正好果园果子熟了。在果园里,小明已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。小明决定把所有的果子合成一堆。 因为小明比较懒,为了省力气,小明开始想点子了: 每一次合并,小明可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过n-1次合并之后,就只剩下一堆了。小明在合并果子时总共消耗的体力等于每次合并所耗体力原创 2016-08-02 10:45:51 · 472 阅读 · 0 评论