http://blog.sciencenet.cn/blog-509534-728984.html分支定界 (branch and bound) 算法是一种在问题的解空间树上搜索问题的解的方法。但与回溯算法不同,分支定界算法采用广度优先或最小耗费优先的方法搜索解空间树,并且,在分支定界算法中,每一个...
分类:
编程语言 时间:
2015-09-19 15:05:42
阅读次数:
214
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2612Find a wayTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submis...
分类:
其他好文 时间:
2015-09-10 07:08:37
阅读次数:
197
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1495Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7...
分类:
其他好文 时间:
2015-09-10 07:04:18
阅读次数:
185
链接:http://poj.org/problem?id=3278Time Limit:2000MSMemory Limit:65536KTotal Submissions:62113Accepted:19441DescriptionFarmer John has been informed of ...
分类:
其他好文 时间:
2015-09-05 11:15:18
阅读次数:
143
链接:http://poj.org/problem?id=2251Time Limit:1000MSMemory Limit:65536KTotal Submissions:21370Accepted:8299DescriptionYou are trapped in a 3D dungeon an...
分类:
其他好文 时间:
2015-09-05 11:04:07
阅读次数:
158
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1548
这个题目很容易让人用广搜。。。无语。。。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#defi...
分类:
其他好文 时间:
2015-08-29 18:54:39
阅读次数:
188
传送门:BZOJ1054傻逼广搜题,按位转化为二进制判重。
坑爹之处在于数字居然是黏在一起给出来的……代码上的小细节见下。#include
#include
#include
#include
#include
#include
#include
using na...
分类:
其他好文 时间:
2015-08-26 10:44:00
阅读次数:
125
并查集+枚举,深搜TLE,感觉广搜有有点戏,没心情试
#include
#include
#define maxn 1010
using namespace std;
struct stu
{
int a,b,l;
};
stu mapp[maxn];
int f[210];
int n,m;
bool cmp(stu x,stu y)
{
return x.l<y.l;
}
int dfs...
分类:
其他好文 时间:
2015-08-26 01:49:06
阅读次数:
164
Description
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers
on their offices.
— ...
分类:
其他好文 时间:
2015-08-21 15:45:32
阅读次数:
205
原文地址:http://www.cnblogs.com/xwz0528/p/4638242.html一. 问题描述把从1到n(n>=2)这n个数摆成一个环,要求相邻的两个数的和是一个素数,找出所有满足条件的环。二. 问题分析1> 解向量:2> 解空间树:排列树,(n-1)!个叶子结点3> 剪枝函数:...
分类:
编程语言 时间:
2015-08-16 17:58:30
阅读次数:
233