摘要:
唔,最近感觉搜索好弱,明天开始做做搜索专题。CODE:#include<stdio.h>#include<stdlib.h>#include<queue>#include<string.h>usingnamespacestd;constintSIZE=52;intmaze[SIZE][SIZE][SIZE];intflag[SIZE][SIZE][SIZE];intl,r,c,T;constintdx[]={-1,1,0,0,0,0};constintdy[]={0,0,-1,1,0,0};constintdz[]={0,0,0,0,-1,1}; 阅读全文
摘要:
网络流-最大流入门题。CODE:#include<iostream>#include<cstdlib>#include<cstdio>#include<cstring>#include<queue>usingnamespacestd;constintM=201;constintINF=0x3f3f3f3f;intflow[M][M],cap[M][M];inta[M],p[M];ints,t;intn,m;voidinit(){memset(p,0,sizeof(p));memset(cap,0,sizeof(cap));}intEK 阅读全文
摘要:
POJ 2449 Remmarguts' Date(中等)http://acm.pku.edu.cn/JudgeOnline/problem?id=2449题意:经典问题:K短路解法:dijkstra+A*(rec),方法很多相关:http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1144该题亦放在搜索推荐题中 POJ 3013 - Big Christmas Tree(基础)http://acm.pku.edu.cn/JudgeOnline/problem?id=3013题意:最简单最短路,但此题要过,需要较好的程序速度 阅读全文