上一页 1 2 3 4 5 6 7 ··· 9 下一页
2010年9月18日
摘要: 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 阅读(389) 评论(0) 推荐(0) 编辑
2010年9月15日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:  http://acm.hdu.edu.cn/showproblem.php?pid=1754题目描述:  [代码]很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时... 阅读全文
posted @ 2010-09-15 16:08 MiYu 阅读(339) 评论(0) 推荐(0) 编辑
2010年9月10日
摘要: 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 阅读(511) 评论(0) 推荐(0) 编辑
2010年9月4日
摘要: 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) 编辑
摘要: 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 阅读(298) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋先前做了这一题, 不过是用 树状数组做的, 对于这一类型的题目也来说非常方便快捷. 具体地址 :http://www.cnblogs.com/MiYu/archive/2010/08/25/1808441.html这几天学了 线段树 , 不是很明白它的用途 和 使用方法, 因为 听说 树状数组是 线段树的 一种特殊情况 ( ... 阅读全文
posted @ 2010-09-04 12:51 MiYu 阅读(531) 评论(2) 推荐(0) 编辑
2010年9月3日
摘要: 多重背包O(N*V)算法详解(使用单调队列)多重背包问题:有N种物品和容量为V的背包,若第i种物品,容量为v[i],价值为w[i],共有n[i]件。怎样装才能使背包内的物品总价值最大?网上关于“多重背包”的资料倒是不少,但是关于怎么实现O(N*V)算法的资料,真得好少呀,关于“单调队列”那部分算法,又没说明得很清楚,看了几遍没看懂原理,只好自己动脑去... 阅读全文
posted @ 2010-09-03 10:58 MiYu 阅读(1138) 评论(0) 推荐(0) 编辑
2010年9月2日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋做ACM题目的时候 , 经常使用到 fill,memset , for 操作对 数据进行初始化操作, 在测试数据不大,而且数组范围也不大的情况下,这几种操作的时间差距不是很明显. 但是!!!! 因为测试数据的数量有时候非常大!!因此对数据初始化 操作的 选择也变得非常重要.于是就对3种操作进行了一个小测试............ 阅读全文
posted @ 2010-09-02 10:47 MiYu 阅读(634) 评论(12) 推荐(0) 编辑
2010年9月1日
摘要: 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 阅读(1215) 评论(0) 推荐(0) 编辑
2010年8月31日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋vector– 一. vector可以模拟动态数组– 二. vector的元素可以是任意类型T,但必须具备赋值和拷贝能力(具有public 拷贝构造函数和重载的赋值操作符) 三.必须包含的头文件#include <vector>– 四. vector支持随机存取–... 阅读全文
posted @ 2010-08-31 22:39 MiYu 阅读(371) 评论(0) 推荐(0) 编辑
摘要: [代码]MiYu原创, 转帖请注明 : 转载自______________白白の屋几种常用的容器: map, vector, list, queue,stack, string ( 这个字符串也算个容器 )STL容器的共通操作–一. 初始化(initialization)•1.产生一个空容器 list<int> l; vector<int> vec;... 阅读全文
posted @ 2010-08-31 21:47 MiYu 阅读(306) 评论(0) 推荐(0) 编辑
2010年8月30日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2688题目描述:RotateTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): ... 阅读全文
posted @ 2010-08-30 16:18 MiYu 阅读(333) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋[代码]用for循环来处理list中的元素  我们想要遍历一个list,比如打印一个中的所有对象来看看list上不同操作的结果。要一个元素一个元素的遍历一个list, 我们可以这样做: /*|| How to print the contents of a simple STL list. Whew! */#include ... 阅读全文
posted @ 2010-08-30 11:31 MiYu 阅读(276) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=3450题目描述:Counting SequencesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/65536 K (Java/Others)Total Sub... 阅读全文
posted @ 2010-08-30 09:59 MiYu 阅读(457) 评论(0) 推荐(0) 编辑
2010年8月29日
摘要: [代码]接着回到线段树上来,线段树是建立在线段的基础上,每个结点都代表了一条线段 [a , b]。长度为1的线段成为元线段。非元线段都有两个子结点,左结点代表的线段为[a , (a + b ) / 2],右结点代表的线段为[( a + b ) / 2 , b]。图一就是一棵长度范围为[1 , 10]的线段树。 长度范围为[1 , L] 的一棵线段树的深度为log ( L - 1 ) + 1。这个显... 阅读全文
posted @ 2010-08-29 21:22 MiYu 阅读(625) 评论(0) 推荐(2) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2642题目描述:[代码]Yifenfei is a romantic guy and he likes to count the stars in the sky.To make the problem easier,we co... 阅读全文
posted @ 2010-08-29 09:30 MiYu 阅读(349) 评论(0) 推荐(0) 编辑
2010年8月27日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--霍夫曼编码是一种被广泛应用而且非常有效的数据压缩技术,根据待压缩数据的特征,一个可压缩掉20%~90%。这里考虑的数据指的是字... 阅读全文
posted @ 2010-08-27 19:20 MiYu 阅读(584) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--要使计算机能完成人们预定的工作,首先必须为如何完成预定的工作设计一个算法,然后再根据算法编写程序。计算机程序要对问题的每个对象... 阅读全文
posted @ 2010-08-27 19:18 MiYu 阅读(1566) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋[代码]复制代码按穷举法编写的程序通常不能适应变化的情况。如问题改成有9个变量排成三角形,每条边有4个变量的情况,程序的循环重数就要相应改变。 对一组数穷尽所有排列,还有更直接的方法。将一个排列看作一个长整数,则所有排列对应着一组整数。将这组整数按从小到大的顺序排列排成一个整数,从对应最小的整数开始。按数列的递增顺序逐一列举... 阅读全文
posted @ 2010-08-27 19:14 MiYu 阅读(1064) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2227题目描述:[代码]How many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For exa... 阅读全文
posted @ 2010-08-27 10:07 MiYu 阅读(401) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页