题目链接:hdu 2295 Radar 题意: 给你n个城市,m个雷达,现在最多用K个雷达,求最小半径覆盖全部的城市。 题解: 二分半径套一个DLX就行。网上随便找的一个板子 1 #include<bits/stdc++.h> 2 #define F(i,a,b) for(int i=a;i<=b; ...
分类:
其他好文 时间:
2017-02-01 20:51:20
阅读次数:
303
题目链接:hdu 4441 Queue Sequence 这题看了题解写的,题解传送门 1 #include<bits/stdc++.h> 2 #define F(i,a,b) for(int i=a;i<=b;++i) 3 #define ls l,m,rt<<1 4 #define rs m+1 ...
分类:
其他好文 时间:
2017-01-31 20:53:55
阅读次数:
279
题目 Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given i ...
分类:
其他好文 时间:
2017-01-31 14:27:56
阅读次数:
253
题目 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, cal ...
分类:
其他好文 时间:
2017-01-31 11:27:35
阅读次数:
195
OS: Windows 7(32 bits) VS:v2012(更新到最后补丁包VS2012.5.iso) 1. QT5.5 1) 下载 在http://download.qt.io/archive/选择qt-〉5.5-〉5.5.1 这个版本的QT支持VS2010 VS2013,而且Windows版 ...
分类:
其他好文 时间:
2017-01-29 18:29:49
阅读次数:
613
转载请注明出处:http://www.cnblogs.com/liangyongrui/p/6350267.html 我用了一个很蹩脚的做法做出来了。 虽然也是O(n) 但是看了标算后,感觉自己的dp实在是不够敏感 我的做法就是堆基底(1 2 4 8 16 32...) 但是用了dp的思想后,都是三 ...
分类:
其他好文 时间:
2017-01-26 00:15:56
阅读次数:
194
A - Holiday Of Equality(water) 题意:一共给你N个数,让你向上补数值,使得最终所有数值都相等,输出最少花费。 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 cons ...
分类:
其他好文 时间:
2017-01-24 22:58:21
阅读次数:
263
A - Petr and a calendar (water) 题意:在2017年,m是月份,d是这个月第一个是星期几。问这个月的日历需要多少行。 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int INF = 0x3f3f3f ...
分类:
其他好文 时间:
2017-01-24 21:49:01
阅读次数:
255
声明:有些网友有可能在CSDN博客上看到过相同的文章,因为本人有两个账号。。。请不要误会,均为原创 这个程序功能强大哦~~ #include <bits/stdc++.h>#include <windows.h>#include <winbase.h>#include <wtypes.h>#incl ...
分类:
编程语言 时间:
2017-01-23 22:37:28
阅读次数:
215
这题 我承认 我过于NAIVE了 我把不能走回边 搞成了 走到一个点必须休息一下。。。 发现它的边数非常少 所以 按边建立矩阵 就可以十分科学的完成本题 矩乘我一定要封装进p,q 1 #include<bits/stdc++.h> 2 #define mod 45989 3 #define ll l ...
分类:
其他好文 时间:
2017-01-23 21:38:07
阅读次数:
201