简单并查集#include#include#include#include#include#include#include#include#include#include#include#define
inf 0x0f0f0f0fusing namespace std;const double p....
分类:
其他好文 时间:
2014-05-01 10:15:58
阅读次数:
367
简单最小生成树,继续我的kruskal#include#include#include#includeusing namespace std;const int
MAX=1000000;struct node{ int left,right,cost;}road[MAX];bool cmp(n...
分类:
其他好文 时间:
2014-05-01 09:28:42
阅读次数:
333
又是一道简单并查集#include#include#include#include#include#include#include#include#include#include#include#define
inf 0x0f0f0f0fusing namespace std;const doub....
分类:
其他好文 时间:
2014-05-01 09:12:36
阅读次数:
289
DescriptionAstronomers often examine star maps
where stars are represented by points on a plane and each star has Cartesian
coordinates. Let the level...
分类:
其他好文 时间:
2014-05-01 05:42:32
阅读次数:
368
首先回顾一下C++类型转换:C++类型转换分为:隐式类型转换和显式类型转换第1部分.隐式类型转换又称为“标准转换”,包括以下几种情况:1)
算术转换(Arithmetic conversion) : 在混合类型的算术表达式中,
最宽的数据类型成为目标转换类型。intival=3;doubledval...
分类:
其他好文 时间:
2014-05-01 05:18:59
阅读次数:
321
1 保留小数点后两位#include cout const char * spilt="/";char
*p;p=strtok(str,spilt);while(p!=NULL){ //cout
#includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:
编程语言 时间:
2014-05-01 05:05:45
阅读次数:
409
1什么是const?(const类型)常类型是指使用类型修饰符const说明的类型,常类型的变量或对象的值是不能被更新的。(但可以偷梁换柱进行更新)2为什么引入const?const
推出的初始目的,正是为了取代预编译指令,消除它的缺点,同时继承它的优点。3主要作用(1)可以定义const常量,具有...
分类:
编程语言 时间:
2014-05-01 03:54:51
阅读次数:
431
以前的代码太挫了,重新整理dlx,学习HH把精确覆盖,重复覆盖整合在一起。
代码:
struct DLX{
const static int maxn=20010;
#define FF(i,A,s) for(int i = A[s];i != s;i = A[i])
int L[maxn],R[maxn],U[maxn],D[maxn];
int size,c...
分类:
其他好文 时间:
2014-04-29 13:43:20
阅读次数:
370
Author:DriverMonkey
Mail:bookworepeng@Hotmail.com
Phone:13410905075
QQ:196568501
#include
#include
#include
#include
#include
#include
using namespace std;
class a_t
{
publi...
分类:
其他好文 时间:
2014-04-29 13:35:21
阅读次数:
598
类--类的定义和声明【下】三、关于类定义的更多内容【接上】//P374 习题12.8
class Sales_item
{
public:
double avg_price() const;
bool same_isbn(const Sales_item &rhs) const
{
return rhs.isbn == isbn;
}
Sa...
分类:
编程语言 时间:
2014-04-29 13:28:21
阅读次数:
324