2016年3月21日

hdu 2685 I won't tell you this is about number theory 数论

摘要: 题目链接 根据公式 $$ gcd(a^m 1, a^n 1) = a^{gcd(m, n)} 1 $$ 就可以很容易的做出来了。 阅读全文

posted @ 2016-03-21 16:43 yohaha 阅读(133) 评论(0) 推荐(0) 编辑

hdu 4647 Another Graph Game 贪心

摘要: 题目链接 感觉这题好厉害...根本没想到怎么做。 我们可以把一条边的权值平均分给它的两个端点, 这样, 如果一个人选了两个端点, 那么相加之和等于这条边的权值。 如果是两个人选了, 那么就相互抵消了。 include include include include include include i 阅读全文

posted @ 2016-03-21 13:48 yohaha 阅读(103) 评论(0) 推荐(0) 编辑

导航