随笔分类 -  ACM-OJ-Codeforces

摘要:Problem - D - Codeforces Fix a Tree 看完第一名的代码,顿然醒悟。。。 我可以把所有单独的点全部当成线,那么只有线和环。 如果全是线的话,直接线的条数-1,便是操作数。 如果有环和线,环被打开的同时,接入到线上。那就是线和环的总数-1. 如果只有环的话,把所有的环打 阅读全文
posted @ 2016-07-20 12:44 卷珠帘 阅读(258) 评论(0) 推荐(0)
摘要:题目链接:HDU 5719 Arrange 昨天的B题,昨天做的时候没注意所有谷堆是全排列,看了Clarification才知道,可是不会做。 实际上只需要将自己的代码改动一步就可以了count = count*(c[i]-b[i]-i+2)%mod,也即c[i]-b[i]+1-(i-1) 看这个样 阅读全文
posted @ 2016-07-18 23:24 卷珠帘 阅读(228) 评论(0) 推荐(0)
摘要:D. Bear and Two Paths time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Bear and Two Pa 阅读全文
posted @ 2016-05-12 23:40 卷珠帘 阅读(292) 评论(0) 推荐(0)
摘要:C. Bear and Colors time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Bear Limak has n colo 阅读全文
posted @ 2016-05-10 13:18 卷珠帘 阅读(217) 评论(0) 推荐(0)
摘要:题目链接 A. Currency System in Geraldion 有1时,所有大于等于1的数都可由1组成。没有1时,最小不幸的数就是1. 题目链接:B .Gerald is into Art 神之队友,八个if条件秒A,orz... 最后给的两个矩形每个长和宽翻过来倒过去,有四种情况。再和给 阅读全文
posted @ 2016-04-17 12:53 卷珠帘 阅读(638) 评论(2) 推荐(3)
摘要:time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input output standard 阅读全文
posted @ 2016-03-31 14:01 卷珠帘 阅读(269) 评论(0) 推荐(0)
摘要:A. Round House time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya lives in a round bui 阅读全文
posted @ 2016-03-31 13:58 卷珠帘 阅读(334) 评论(0) 推荐(0)
摘要:B. Bear and Compressing 题目链接 Problem - B - Codeforces Limak is a little polar bear. Polar bears hate long strings and thus they like to compress them. 阅读全文
posted @ 2016-03-27 22:22 卷珠帘 阅读(215) 评论(0) 推荐(0)