摘要: #include<iostream>#include<cstdio>#include<cstring>using namespace std; const int max_v=100;const int INF=1<<20;int V,E;int d[max_v];bool used[max_v]; 阅读全文
posted @ 2017-11-06 00:13 unknownname 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio>#include <cstring>#include <queue>#include <algorithm>#define MAXN (5000 + 10)#define INF (5000*5000*2)using namespace std; struct ed 阅读全文
posted @ 2017-11-06 00:11 unknownname 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 计算方法:1.正数部分数部分:2^(字节数*8-1)-1 2.负数部分:-(2^(字节数*8-1)+1) unsign int:正数部分*2+1 阅读全文
posted @ 2017-11-02 17:20 unknownname 阅读(2020) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/problem/HDU-2680 思路:单边,将终点看做起点,反向建立图,否则超时 #include <cstdio>#include <cstring>#include <iostream>using namespace std; const int maxn 阅读全文
posted @ 2017-10-30 14:32 unknownname 阅读(139) 评论(0) 推荐(0) 编辑
摘要: /* O(V^2) */ #include<cstdio>#include<iostream>#include<cstring>using namespace std; int v,e;//顶点数const int INF=1<<30;const int max_v=1e4+5;int d[max_ 阅读全文
posted @ 2017-10-30 14:21 unknownname 阅读(119) 评论(0) 推荐(0) 编辑
摘要: /*可解决图中存在环(负权值)问题,dijksta则不能 O(V*E) */ #include<iostream>#include<cstdio>#include<cstring>using namespace std;const int max_v=1170;const int max_e=217 阅读全文
posted @ 2017-10-30 14:11 unknownname 阅读(111) 评论(0) 推荐(0) 编辑