找出树中2条不重复的路径使其路径长度乘积最大#include #include #include #include #include using namespace std;const int MAXN = 205;typedef pair Edge;vector adj[MAXN];bool de...
分类:
其他好文 时间:
2014-08-26 13:32:16
阅读次数:
197
n,m#include #include #include #include using namespace std;#define ll long long#define maxn 444#define maxe 55000#define inf 0x3f3f3f3fstruct Edge{ .....
分类:
其他好文 时间:
2014-08-24 16:37:12
阅读次数:
627
题目链接Kundu is true tree lover. Tree is a connected graph havingNvertices andN-1edges. Today when he got a tree, he colored each edge with one of either...
分类:
其他好文 时间:
2014-08-23 22:55:51
阅读次数:
309
解题报告
思路:
spfa判负环。
#include
#include
#include
#include
#define inf 0x3f3f3f3f
#define N 40000
#define M 100000
using namespace std;
struct node {
int v,w,next;
} edge[M];
int head[N],dis[N],...
分类:
其他好文 时间:
2014-08-23 20:25:41
阅读次数:
261
解题报告
题目传送门
思路:
bfs建图跑一下费用流就行。
#include
#include
#include
#include
#define inf 0x3f3f3f3f
using namespace std;
struct E {
int v,cost,cap,next;
} edge[100000];
int head[1000],cnt,dis[1000],...
分类:
其他好文 时间:
2014-08-23 19:07:51
阅读次数:
243
解题报告
思路:
裸裸的最短路。
#include
#include
#include
#include
#define inf 0x3f3f3f3f
#define N 40000
#define M 100000
using namespace std;
struct node
{
int v,w,next;
}edge[M];
int head[N],dis[N],vi...
分类:
其他好文 时间:
2014-08-23 19:05:51
阅读次数:
162
#include #include #include #include #define INF 0x3f3f3f3fusing namespace std;struct node{ int u,v,w,next;}edge[150001];int head[30001],dis[30001],...
分类:
其他好文 时间:
2014-08-23 09:55:10
阅读次数:
186
解题报告
思路:
求解:
p:a-b=x
v:a-b>=1
的方程
#include
#include
#include
#include
#define inf 0x3f3f3f3f
using namespace std;
struct node
{
int v,w,next;
} edge[220000];
int head[1111],dis[1111],vis...
分类:
其他好文 时间:
2014-08-22 14:29:28
阅读次数:
192
#include #include #include #includeusing namespace std;const int N=300;const int MAXE=200000;const int inf=10&&d[u]+edge[j].w<d[v]) { ...
分类:
其他好文 时间:
2014-08-20 15:57:52
阅读次数:
231
IE=edge: 默认使用最新内核IE=6/7/8.... 指定特定版本内核chrome=1:如果有装chrome就使用chrome的内核IE的兼容性问题:在早起IE8之前,那个时候IE浏览器还属于比较独大的情况,那个时候他有很多东西是和网络的Standard不太一样。譬如他有自己才看的懂得自定义T...
分类:
Web程序 时间:
2014-08-19 16:24:34
阅读次数:
247