摘要:
转载:http://www.cnblogs.com/hxsyl/p/3290832.html 为什么写这个呢?因为那天听到了这个词,属于MST的扩展……最小K度树有空研究。一.理论准备 需要读者事先懂得prime算法,不太了解的请看博主这一篇http://www.cnblogs.co... 阅读全文
摘要:
#include#includeusing namespace std;int map[505][505];int v, e;int prime(){ bool vis[505]; int dist[505]; int i,j,sum=0; for(i=1;imap[k][j]) ... 阅读全文
摘要:
/*只需判断等效边和必选边的个数和n-1的关系即可*/#include#include#define N 110struct node { int u,v,w;}f[N*N*2];int cmp(const void *a,const void*b) {return (*(struct node ... 阅读全文
摘要:
#includeint main(){ __int64 h,a,b,k,j=0; while(scanf("%I64d%I64d%I64d%I64d",&h,&a,&b,&k),h||a||b||k) { printf("Case #%I64d: ",++j); ... 阅读全文
摘要:
/*参考博文:http://hi.baidu.com/dragon_eric123/item/82e259200ece744046996282 有上下界的有源最小流*/#include#include#includeusing namespace std;#define N 300#define... 阅读全文
摘要:
/*坑啊,pe的程序在zoj上原来是wa。题目大意:一个屌丝给m个女神拍照,计划拍照n天,每一天屌丝最多个C个女神拍照,每天拍照数不能超过D张,而且给每个女神i拍照有数量限制[Li,Ri],对于每个女神n天的拍照总和不能超过Gi,如果有解求屌丝最多能拍多少张照,并求每天给对应女神拍多少张照;否则输出... 阅读全文
摘要:
#include#include#include#includeusing namespace std;typedef struct node{ int x,y; bool operatorma; mapf,ff; node e; int n,m,i,j,k,t,id,idd... 阅读全文
摘要:
模板类型的题具体参考国家集训队论文:http://wenku.baidu.com/view/0f3b691c59eef8c75fbfb35c.html参考博客:http://blog.csdn.net/qq172108805/article/details/7783010#include#inclu... 阅读全文