贪心
wJs9528-1
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ACM POJ 1328 Radar Installation
Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each s原创 2015-07-09 19:30:50 · 504 阅读 · 0 评论 -
CodeForces 622E Ants in Leaves (贪心策略 递推公式)
Ants in Leaves Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description Tree is a connected graph without cycles. A leaf of a tree is any vertex connected w原创 2016-04-07 19:13:46 · 945 阅读 · 0 评论 -
HDU 5802 Windows 10 (贪心)
Windows 10 Problem Description Long long ago, there was an old monk living on the top of a mountain. Recently, our old monk found the operating system of his computer was updating to windows 10原创 2016-08-04 21:37:28 · 508 阅读 · 0 评论 -
UVA - 12545 Bits Equalizer (贪心)
题意: 给出两个字符串 S和T ,S中只含0,1,?,T中只含0,1 要求对S操作把S转换成T,规则如下: 1.0 ->1 2.任意位置两两交换 3.?->0或1 求最少步数,如果无法转换输出-1对于S与T的不对应情况,能很直观的分为四类,01 10 1? 0?,由于交换能够使步数减少,01 和 10必然要先交换,交换之后如果只剩下01,那么剩下的不对应个数累加就直接是答案,否则再考虑?原创 2016-09-02 10:42:54 · 408 阅读 · 0 评论 -
codeforces 716 B. Anatoly and Cockroaches(greedy)
题意:给一些在一排的蟑螂涂色或者两两交换位置,使最终的颜色交替出现,输出最小步数枚举两种r和b在开头位置的情况,取最小,推一下计算公式就出来了#include<cstring> #include<string> #include<iostream> #include<queue> #include<cstdio> #include<algorithm> #include<map> #include<原创 2016-09-25 12:04:49 · 433 阅读 · 0 评论
分享