- 博客(11)
- 收藏
- 关注
原创 POJ 1141
括号匹配:递归+记录代码很清楚:#include #include #include #include #include using namespace std;string str;int f[1001][1001];int p[1001][1001];int n;void MyScanf(int &num){ char a; while(a=getchar(),!isdigit(a)); num = a-'0'; whil
2010-08-03 01:12:00
636
原创 POJ 1185
<br /> <br /><br /><br />这道题很犀利,从这道题真正了解到状态压缩DP和位运算。<br /><br /><br />同时这道题也用到了滚动数组。<br /><br /><br />着篇解题报告很好:http://apps.hi.baidu.com/share/detail/14572384<br /> <br />代码:<br /> <br /> <br />#include <iostream>#include <stdio.h>#include <algorithm>
2010-08-03 01:09:00
1430
原创 POJ 1083
水题:插入多个线段,统计被最多线段覆盖的点,被覆盖的次数。大了得用线段树了,但是这个规模很小~~嘿嘿……详见代码:#include #include #include #include #include using namespace std;void MyScanf(int &num){ char a; while(a=getchar(),!isdigit(a)); num = a-'0'; while ((a = getchar())!='
2010-08-03 00:56:00
485
原创 POJ 1080
<br />这道题是最短编辑路径。<br /> <br />和LCS差不多。<br /> <br />详见代码:<br />#include <iostream>#include <stdio.h>#include <algorithm>#include <cmath>#include <cstring>using namespace std;void MyScanf(int &num){ char a; while(a=getchar(),!isdigit(a))
2010-08-03 00:52:00
544
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人