09 2010 档案
HDU 1698 HDOJ 1698 Just a Hook ACM 1698 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址 : http://acm.hdu.edu.cn/showproblem.php?pid=1698题目描述 :Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submiss... 阅读全文
posted @ 2010-09-27 09:56 MiYu 阅读(336) 评论(0) 推荐(0)
HDU 2795 HDOJ 2795 Billboard ACM 2795 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2795题目描述:[代码]At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height ... 阅读全文
posted @ 2010-09-26 22:15 MiYu 阅读(368) 评论(0) 推荐(0)
HDOJ 2526 HDU 2526 浪漫手机 ACM 2526 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2526题目描述:[代码]最近,WisKey迷上了手机铃声,但是他对音律不是很懂,所以他想着能否用计算机来随机生成铃声。当WisKey写好程序后,发现生成出来的根本不是铃声,而是噪声!之后WisKey查阅了一些乐谱发现,其实很多铃... 阅读全文
posted @ 2010-09-26 16:41 MiYu 阅读(494) 评论(0) 推荐(0)
HDOJ 2714 HDU 2714 ISBN ACM 2714 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址 : http://acm.hdu.edu.cn/showproblem.php?pid=2714题目描述:[代码]Farmer John's cows enjoy reading books, and FJ has discovered that his cows produce more milk when th... 阅读全文
posted @ 2010-09-25 20:25 MiYu 阅读(404) 评论(0) 推荐(0)
Floyd-Warshall算法详解(转)
摘要:Floyd-Warshall算法,简称Floyd算法,用于求解任意两点间的最短距离,时间复杂度为O(n^3)。我们平时所见的Floyd算法的一般形式如下:1voidFloyd(){2inti,j,k;3for(k=1;k<=n;k++)4for(i=1;i<=n;i++)5for(j=1;j<=n;j++)6if(dist[i][k]+dist[k][j]<dist[i][... 阅读全文
posted @ 2010-09-25 20:03 MiYu 阅读(4418) 评论(0) 推荐(0)
HDOJ 1070 HDU 1070 Milk ACM 1070 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:  http://acm.hdu.edu.cn/showproblem.php?pid=1070题目描述:[代码]Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. ... 阅读全文
posted @ 2010-09-18 11:23 MiYu 阅读(395) 评论(0) 推荐(0)
HDOJ 1754 HDU 1754 I Hate It ACM 1754 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:  http://acm.hdu.edu.cn/showproblem.php?pid=1754题目描述:  [代码]很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时... 阅读全文
posted @ 2010-09-15 16:08 MiYu 阅读(345) 评论(0) 推荐(0)
HDOJ 1063 HDU 1063 Exponentiation JAVA 编写 ACM 1063 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1063题目描述:[代码] Problems involving the computation of exact values of very large magnitude and precision are common... 阅读全文
posted @ 2010-09-10 16:59 MiYu 阅读(515) 评论(0) 推荐(0)
HDOJ 1157 HDU 1157 Who's in the Middle ACM 1157 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1157题目描述:[代码]FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' co... 阅读全文
posted @ 2010-09-04 22:38 MiYu 阅读(414) 评论(0) 推荐(0)
HDOJ 1017 HDU 1017 A Mathematical Curiosity ACM 1017 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址 :    http://acm.hdu.edu.cn/showproblem.php?pid=1017题目描述:[代码]Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b ... 阅读全文
posted @ 2010-09-04 13:29 MiYu 阅读(302) 评论(0) 推荐(0)
HDOJ 1166 HDU 1166 敌兵布阵 ACM 1166 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋先前做了这一题, 不过是用 树状数组做的, 对于这一类型的题目也来说非常方便快捷. 具体地址 :http://www.cnblogs.com/MiYu/archive/2010/08/25/1808441.html这几天学了 线段树 , 不是很明白它的用途 和 使用方法, 因为 听说 树状数组是 线段树的 一种特殊情况 ( ... 阅读全文
posted @ 2010-09-04 12:51 MiYu 阅读(536) 评论(2) 推荐(0)
多重背包O(N*V)算法详解(使用单调队列)(转载)
摘要:多重背包O(N*V)算法详解(使用单调队列)多重背包问题:有N种物品和容量为V的背包,若第i种物品,容量为v[i],价值为w[i],共有n[i]件。怎样装才能使背包内的物品总价值最大?网上关于“多重背包”的资料倒是不少,但是关于怎么实现O(N*V)算法的资料,真得好少呀,关于“单调队列”那部分算法,又没说明得很清楚,看了几遍没看懂原理,只好自己动脑去... 阅读全文
posted @ 2010-09-03 10:58 MiYu 阅读(1152) 评论(0) 推荐(0)
fill memset for 小测试
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋做ACM题目的时候 , 经常使用到 fill,memset , for 操作对 数据进行初始化操作, 在测试数据不大,而且数组范围也不大的情况下,这几种操作的时间差距不是很明显. 但是!!!! 因为测试数据的数量有时候非常大!!因此对数据初始化 操作的 选择也变得非常重要.于是就对3种操作进行了一个小测试............ 阅读全文
posted @ 2010-09-02 10:47 MiYu 阅读(652) 评论(12) 推荐(0)
学习笔记 -- 关于 STL 中的 heap ( 堆 )
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋C ++ STL 中与heap 有关的操作有 如下几个 : make_heap(), pop_heap(), push_heap(), sort_heap(), is_heap;is_heap() :原型如下 : 1.bool is_heap(iterator start, iterator end); ->... 阅读全文
posted @ 2010-09-01 17:18 MiYu 阅读(1223) 评论(0) 推荐(0)