2016年8月27日

Gym 100886J Sockets 二分答案 + 贪心

摘要: Description standard input/outputStatements Valera has only one electrical socket in his flat. He also has m devices which require electricity to work 阅读全文

posted @ 2016-08-27 22:37 stupid_one 阅读(370) 评论(0) 推荐(0) 编辑

UVALive 5983 二分答案+dp

摘要: 想了很久都想不出怎么dp,然后发现有些例子,如果你开始不确定起始值的话,是不能dp的,每种状态都有可能,所以只能二分一个答案,确定开始的val值,来dp了。 #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath 阅读全文

posted @ 2016-08-27 10:00 stupid_one 阅读(178) 评论(0) 推荐(0) 编辑

导航