
解题报告
gwasdf
这个作者很懒,什么都没留下…
展开
-
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 · 486 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论