2014年4月8日
摘要: 算法1 我们知道对于环1-2-3-4-1,每个节点的度都是2,基于此我们有如下算法(这是类似于有向图的拓扑排序): 求出图中所有顶点的度, 删除图中所有度 >&graph, int node, vector&visit, vector&father) { int n = graph.size(); visit[node] = 1; //cout《node《"-\n"; for(int i = 0; i "; tmp = father[tmp]; } cout《tmp《endl; } else if(visit[i] == 0) { f 阅读全文
posted @ 2014-04-08 16:42 haosola 阅读(449) 评论(0) 推荐(0) 编辑
摘要: "IP地址的长度为32位,分为4段,每段8位,用十进制数字表示,每段数字范围为0~255,段与段之间用句点隔开。" 由此我们了解到,IP地址实际上是一个32位正整数,在C#中可以使用uint类型来表示,但SQLServer数据库里好像没有对应的类型;转而使用数据库支持的int类型的话,则会出现溢出的情况;因此我们做出妥协:使用long(bigint)类型。 TIP: int取值范围:-2,147,483,648 到 2,147,483,647 uint取值范围:0 到 4,294,967,295 long取值范围:-9,223,372,036,854,775,808 到 9 阅读全文
posted @ 2014-04-08 16:37 haosola 阅读(435) 评论(0) 推荐(0) 编辑

toeflacttoeflieltstoefltoeflact