题目来源:HDU 1542 Atlantis
题意:给你一些矩形(左下角和右上角)求面积
思路:参考here这个超赞的 一看就懂了
#include
#include
#include
#include
using namespace std;
const int maxn = 210;
struct node
{
double l, r, h;
int s, val;
nod...
分类:
其他好文 时间:
2014-05-07 08:59:09
阅读次数:
395
题目链接: SCUT 2014
题目大意: 判断给出的字符串中是否是正确的科学计数法
A+1.5Be+8C,可以是实数或者含有指数的实数,ABC三个部分表示空格,可有可无,正负号可有可无
指数部分只能是整数
解题思路: 建立有穷自动机状态转移表,一共是10种状态...
分类:
其他好文 时间:
2014-05-07 05:32:27
阅读次数:
330
请不要随便指点别人该怎么做、每个人的人生都应该自己掌握、你给不了别人一切、你也不懂别人的忧伤、
微笑不代表快乐、哭泣不一定悲伤
不努力怎么让那些关心你的人幸福、不努...
分类:
其他好文 时间:
2014-05-07 05:02:04
阅读次数:
263
昨晚Debug了好久始终找不出哪里错了,今早再一看发现自己已荣升逗比Beta 2.0 Version.
个人感觉此题为HDU 4003 的弱化版。
把每棵子树都看成一类商品,在每类商品中至多选一件。则问题转化为最基本的分组背包问题。
dp[s][c][k] c == 1时,表示在s结点不返回时走K的最大收益,c == 0时,表示在s结点重新返回时走k步的最大收益。
可以dfs从底到顶更新d...
分类:
移动开发 时间:
2014-05-07 04:52:22
阅读次数:
500
不小心重命名了libc.so.6动态库,运行命令
#mv /lib/libc.so.6 /lib/libc.so.6.back
#ls
ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
各种命令都不好...
分类:
其他好文 时间:
2014-05-07 04:49:53
阅读次数:
319
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087
题意:
给出字符串s1和s2,找出s1中有多少个s2。
算法:
KMP字符串匹配。
思路:
简单,看代码吧。(需要注意的就是字符串用要scanf输入)
代码:
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2014-05-07 04:46:37
阅读次数:
304
Popular Rice Recipe
Did you know that there are over 40,000 varieties of Rice in the world ? There are so many dishes that can be prepared with Rice too. A famous chef from Mumbai, Tid Gusto prep...
分类:
其他好文 时间:
2014-05-07 04:05:46
阅读次数:
428
http://acm.hdu.edu.cn/showproblem.php?pid=3038
这是一道并查集题目,这并查集感觉好难写,构思花了我很长很长时间,不过打码时间很短。考虑清楚之后明显快多了
#include
#include
#include
#include
#include
#include
#include
#define N 200010
using names...
分类:
其他好文 时间:
2014-05-07 04:03:06
阅读次数:
331
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358
题意:...
分类:
其他好文 时间:
2014-05-07 03:34:17
阅读次数:
354