PKU POJ 2531 Network Saboteur 搜索
摘要:
暴力搜索也能过,剪枝去掉重复搜索,可以到1s内View Code #include <iostream>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;int n,c[25][25];bool t[25];int mmax;void dfs(int p,int x){ int i; if(x==0||n-p==x) { if(x>0) for (i=p;i<n;++i) t[i]=true; ... 阅读全文
posted @ 2013-03-19 16:19 Deller 阅读(140) 评论(0) 推荐(0)
浙公网安备 33010602011771号