摘要: A. Slightly Decreasing Permutations 后$k$个倒序放前面,前$n k$个顺序放后面。 B. Find Marble 模拟。 C. Building Permutation 排序。 D. Permutation Sum 折半,$a_i$ 固定为$1,\cdots,n 阅读全文
posted @ 2016-12-30 11:51 mcginn 阅读(189) 评论(0) 推荐(0) 编辑
摘要: A. Bit++ 模拟。 B. Painting Eggs 贪心,每个物品给使差值较小的那个人,根据题目的约数条件,可证明贪心的正确性。 C. XOR and OR $,,00 \to 00,01 \to 11,11 \to 01$ 根据上述转换,只要至少存在一个1,则可以得到任意个数(不包括0)的 阅读全文
posted @ 2016-12-30 11:28 mcginn 阅读(158) 评论(0) 推荐(0) 编辑