题目链接:http://poj.org/problem?id=1011
这道题用到了深搜+剪枝。
#include
#include
#include
using namespace std;
int a[65];
int vis[65];
int n;
int cmp(int x,int y)
{
return x>y;
}
int dfs(int len,int need,int ...
分类:
其他好文 时间:
2014-05-05 13:28:57
阅读次数:
290
本文出自:http://blog.csdn.net/svitter
括号匹配一:http://acm.nyist.net/JudgeOnline/problem.php?pid=2
括号匹配二:http://acm.nyist.net/JudgeOnline/problem.php?pid=15
之前被这个题目难住,现在看动态规划就顺便过来AC了它。结果发现当年被难住一点...
分类:
其他好文 时间:
2014-05-03 23:52:18
阅读次数:
408
Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets
so as the following conditions hold:
The product of all numbers in the first set is less ...
分类:
其他好文 时间:
2014-05-03 23:51:19
阅读次数:
621
本题思路:
1 利用string保存数据,把string分成两半
2 由小到大排序
3 有小到大逐个比较,有一个不符合条件就可以结束循环了...
分类:
其他好文 时间:
2014-05-03 23:45:34
阅读次数:
349
http://poj.org/problem?id=1486题意:给n个矩形的4个边界的坐标(左上和右下),分别是:xmin、xmax、ymin、ymax。又给出四个数字的坐标。每个数字只能属于一个矩形。求出每个数字的从属关系。题解:二分图最大匹配问题:数字和矩形的匹配。要求出每一条必须边。先求出最...
分类:
其他好文 时间:
2014-05-03 23:41:48
阅读次数:
310
原因:在测试机上首次安装oracle11G
RAC,安装完成后正常使用,过了一段时间后重启节点1测试是否可以自启动,解决节点1没有自启动,手工启动也无法启动过程:在节点一上运行:#
pwd/u01/grid/bin# ./crsctl start crsCRS-4124: Oracle High A...
分类:
数据库 时间:
2014-05-03 23:29:37
阅读次数:
905
Valera wanted to prepare a Codesecrof round. He's already got one problem and he wants to set a time limit (TL) on it.
Valera has written n correct solutions. For each correct solution, he knows it...
分类:
其他好文 时间:
2014-05-03 16:53:51
阅读次数:
364
Max Sum of Max-K-sub-sequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5673 Accepted Submission(s): 2049
Problem Description...
分类:
其他好文 时间:
2014-05-03 16:30:10
阅读次数:
412
本题有意思,是hash表的灵活运用。
思路:
1 计算好总字符数,和使用hash表A[26]记录好各个字符出现的次数
2 判断总字符是否可以被k整除,如果不可以,那么就不能分成k个子字符了
3 计算各个字符出现的次数是否能被k整除,如果不能,那么就不能分成k个子字符
4 根据字符出现的次数逐个打印...
分类:
其他好文 时间:
2014-05-03 15:43:20
阅读次数:
394
点击打开链接
Party All the Time
Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2961 Accepted Submission(s): 939
Problem Description...
分类:
其他好文 时间:
2014-05-03 15:30:56
阅读次数:
374