Description
In Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of members of the general public. Every time a trial is set to begin, a jury has to be sele...
分类:
其他好文 时间:
2015-02-15 18:09:15
阅读次数:
118
找每个点能转移出去的状态时要回溯到根去掉所有能转移的点来去重。。
可能这种做法在距离根距离较小的时候能用。。(隐隐感觉有bug,还是人云亦云地做掉先了。。)
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2014-12-01 20:56:15
阅读次数:
199
两段英文,比较最多有多少个单词连续一样,并将其输出……
由于要求从头打出……dfs一发把……
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
bool flag;
int dp[110][110];
string a[...
分类:
其他好文 时间:
2014-11-21 14:24:58
阅读次数:
144
Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judg...
分类:
其他好文 时间:
2014-11-21 01:37:01
阅读次数:
185
Description
Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to go...
分类:
其他好文 时间:
2014-11-20 23:48:40
阅读次数:
283
LCS问题,基础DP。
让我很忧伤的WA了很多次。只是一个LCS问题,需要记录一下路径。
自己的想办法记录path出错,最后只好用标记。
没有什么优化,二维数组,递归打印,cin.eof() 来识别 end of file 标识。
至于单词用map 映射的。其实也用不着,直接二维string或者 二维char 然后strcmp 也行。
Special Judge
...
分类:
其他好文 时间:
2014-11-18 14:46:41
阅读次数:
196
Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judg...
分类:
其他好文 时间:
2014-11-08 07:08:41
阅读次数:
160
POJ 2250 Compromise(最长公共子序列LCS)
http://poj.org/problem?id=2250
题意:
给你两段由空格分隔的语句, 要你求该两段语句的最长公共子序列. 且随便输出一个解即可. 注意每个单词需要看成我们一般处理字符串子序列的一个单独字符. 即每个单词是一个整体.
分析:
与往常计算最长公共子序列一样的方式即可. 然后用DFS输出序列即可.本题与POJ1458提供的解法本质一样.
http://blog.csdn.net/u0134806...
分类:
其他好文 时间:
2014-11-03 17:46:19
阅读次数:
219
Compromise
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 155 Accepted Submission(s): 47
Problem Description
Xiaoqiang and Amoeba (...
分类:
其他好文 时间:
2014-10-08 00:00:34
阅读次数:
322
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5005
题目巨长,所以不贴题目了,直接说大意(话说大意也不短。。。。)。
题目大意:有两个人A和X,给一个有向无环图(DAG),每一个出度为0的节点(下面称这些节点为“叶子节点”)有两个权值x和y(所有的x,y都不一样,这点非常重要)。除了叶子节点,其他所有节点都都由A或X控制。如果当前位置...
分类:
其他好文 时间:
2014-09-13 21:29:55
阅读次数:
182