会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hr_whisper
新 blog :
www.hrwhisper.me
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
23
24
25
26
27
28
29
30
31
···
34
下一页
2013年9月28日
POJ 1753 Flip Game DFS枚举
摘要: 看题传送门:http://poj.org/problem?id=1753DFS枚举的应用。基本上是参考大神的。。。。学习学习。。#include#includeusing namespace std;int n,s,d,ans;bool a[5][5],flag=false;//判断全部一样的情况b...
阅读全文
posted @ 2013-09-28 11:45 hr_whisper
阅读(140)
评论(0)
推荐(0)
2013年9月24日
POJ 2586 Y2K Accounting Bug 贪心
摘要: 看题传送门 :http://poj.org/problem?id=2586题目大意:一个公司在12个月中,每个月盈余s,或亏损d.但记不得哪些月盈余,哪些月亏损,只能记得连续5个月的代数和总是亏损(#includeusing namespace std;int s,d,ans;void solve(...
阅读全文
posted @ 2013-09-24 23:38 hr_whisper
阅读(119)
评论(0)
推荐(0)
UVA 10870 Recurrences 矩阵快速幂
摘要: 看题传送门:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1811题目大意:f(n) = a1f(n- 1) + a2f(n- 2) + a3f(n-3) ...
阅读全文
posted @ 2013-09-24 23:25 hr_whisper
阅读(168)
评论(0)
推荐(0)
2013年9月23日
POJ 2109 Power of Cryptography
摘要: 看题传送门:http://poj.org/problem?id=2109题目大意:给定整数n和p求一个k使得k ^n = p.(1#includeint main(){ double n,p; while(scanf("%lf%lf",&n,&p)!=EOF) { printf("%.0lf\n"...
阅读全文
posted @ 2013-09-23 17:03 hr_whisper
阅读(87)
评论(0)
推荐(0)
2013年9月22日
POJ 1018 Communication System 贪心+枚举
摘要: 看题传送门:http://poj.org/problem?id=1018题目大意:某公司要建立一套通信系统,该通信系统需要n种设备,而每种设备分别可以有m个厂家提供生产,而每个厂家生产的同种设备都会存在两个方面的差别:带宽bandwidths 和 价格prices。现在每种设备都各需要1个,考虑到性...
阅读全文
posted @ 2013-09-22 23:09 hr_whisper
阅读(173)
评论(0)
推荐(0)
2013年9月21日
POJ 1328 Radar Installation 贪心
摘要: 传送门http://poj.org/problem?id=1328题目大意:平面上有一些岛屿,现要求用一些圆心在x轴上的(雷达)来覆盖这些岛屿,问最少需要的雷达数目。看了大神的思路:把点按横坐标排序,然后把每个点的雷达尽量往右放,然后每放一个雷达都要保证雷达左面的岛都被雷达所覆盖。所以我们可以按一个...
阅读全文
posted @ 2013-09-21 23:05 hr_whisper
阅读(111)
评论(0)
推荐(0)
2013年9月19日
POJ 2362 Square DFS
摘要: 传送门:http://poj.org/problem?id=2362题目大意:给一些不同长度的棍棒,问是否可能组成正方形。学习了写得很好的dfs赶紧去玩博饼了。。。。。晚上三个地方有约。。。。。T T分身乏术啊。。。。#include#includeusing namespace std;const...
阅读全文
posted @ 2013-09-19 19:23 hr_whisper
阅读(115)
评论(0)
推荐(0)
2013年9月15日
POJ 1050 To the Max
摘要: 传送门http://poj.org/problem?id=1050做这题的巧妙之处在于把矩阵转化为一维数组,然后求子序列最大和。如0 -2 -7 09 2 -6 2-4 1 -4 1-1 8 0 -2压缩前两行可以得到 9 0 -13 2#include#includeusing namespace...
阅读全文
posted @ 2013-09-15 16:13 hr_whisper
阅读(120)
评论(0)
推荐(0)
HDU 1003 Max Sum
摘要: 为POJ 1050增加熟悉度。洗洗睡。明天高数竞赛是神马。。。可以吃么。。。。。不对。。。。。。。过12点了。。。。。。应该说今天。。。说好的不熬夜。。。。#include#includeusing namespace std;const int MAXN=100000+10;int a[MAXN]...
阅读全文
posted @ 2013-09-15 00:17 hr_whisper
阅读(113)
评论(0)
推荐(0)
2013年9月14日
POJ 2479 Maximum sum POJ 2593 Max Sequence
摘要: d(A) = max{sum(a[s1]..a[t1]) + sum(a[s2]..a[t2]) | 1#includeusing namespace std;const int MAXN=50000+10;int left[MAXN],right[MAXN],a[MAXN];int main(){...
阅读全文
posted @ 2013-09-14 13:10 hr_whisper
阅读(146)
评论(0)
推荐(0)
上一页
1
···
23
24
25
26
27
28
29
30
31
···
34
下一页
公告