2010年8月26日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1555题目描述:[代码]8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天?Input输入包括多个测试实例.每个测试实例包括2个整数M, k,(2 <= k <= M &... 阅读全文
posted @ 2010-08-26 18:56 MiYu 阅读(478) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1541题目描述:[代码]Astronomers often examine star maps where stars are represented by points on a plane and each star has ... 阅读全文
posted @ 2010-08-26 12:33 MiYu 阅读(945) 评论(2) 推荐(1) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1892题目描述:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Seeyou~... 阅读全文
posted @ 2010-08-26 11:48 MiYu 阅读(436) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2473题目描述:[代码]Recognizing junk mails is a tough task. The method used here consists of two steps:1) Extract the commo... 阅读全文
posted @ 2010-08-26 09:40 MiYu 阅读(524) 评论(0) 推荐(0) 编辑
2010年8月25日
摘要: 今天学习了 树状数组, 自己小结下 :简单介绍下 树状数组 :   树状数组是一个查询和修改复杂度都为log(n)的数据结构,假设数组a[1...n],那么查询a[1] +……+ a[i] 的时间是log级别的,而且是一个在线的数据结构,支持随时修改某个元素的值,复杂度也为log级别。来观察一下这个图:令这棵树的结点编号为C1,C2……Cn。令每个... 阅读全文
posted @ 2010-08-25 20:18 MiYu 阅读(308) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址:  http://acm.hdu.edu.cn/showproblem.php?pid=1166题目描述:[代码]C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采... 阅读全文
posted @ 2010-08-25 19:54 MiYu 阅读(671) 评论(1) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋[代码][代码]MiYu原创, 转帖请注明 : 转载自 ______________白白の屋 http://www.cnblog.com/MiYuAuthor By : MiYuTest : 4Program : 1075*/#include <iostream>#include <string>u... 阅读全文
posted @ 2010-08-25 11:24 MiYu 阅读(399) 评论(0) 推荐(0) 编辑
2010年8月24日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址 : http://acm.hdu.edu.cn/showproblem.php?pid=1247题目描述:[代码]A hat’s word is a word in the dictionary that is the concatenation of exactly two other words ... 阅读全文
posted @ 2010-08-24 12:44 MiYu 阅读(505) 评论(0) 推荐(0) 编辑
2010年8月23日
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1800题目描述:[代码]In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to fin... 阅读全文
posted @ 2010-08-23 17:42 MiYu 阅读(376) 评论(0) 推荐(0) 编辑
摘要: [代码]MiYu原创, 转帖请注明 : 转载自______________白白の屋由于STL是一个统一的整体,map的很多用法都和STL中其它的东 西结合在一起;map中由于它内部有序,由红黑树保证,因此很多函数执行的时间复杂度都是log2N的,如果用map函数可以实现的功能,而STL Algorithm也可以完成该功能,建议用map自带函数,效率高一些……Map是STL的... 阅读全文
posted @ 2010-08-23 17:38 MiYu 阅读(266) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1671题目描述:[代码]Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefi... 阅读全文
posted @ 2010-08-23 16:11 MiYu 阅读(404) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1251题目描述:[代码]Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一... 阅读全文
posted @ 2010-08-23 11:04 MiYu 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--scanf中一种很少见但很有用的转换字符:[...]和[^...]。#include<stdio.h>intmain(){charstrings[100];scanf("%[1234567... 阅读全文
posted @ 2010-08-23 10:56 MiYu 阅读(838) 评论(0) 推荐(1) 编辑
2010年8月22日
摘要: [代码]02{03doublef0,f0d,x;04x = x0;05do06{07x0 = x;08f0 = ((a * x + b) * x + c) * x + d;09f0d = ( 3 * a * x + 2 * b ) * x + c;10x = x0 - f0 / f0d;11}12while(fabs(f0) >= 1e-12);13returnx;14}牛顿迭代法  牛顿迭... 阅读全文
posted @ 2010-08-22 17:19 MiYu 阅读(1419) 评论(0) 推荐(0) 编辑
摘要: [代码] 阅读全文
posted @ 2010-08-22 17:04 MiYu 阅读(1138) 评论(0) 推荐(1) 编辑
摘要: [代码] 阅读全文
posted @ 2010-08-22 17:01 MiYu 阅读(1001) 评论(0) 推荐(1) 编辑
2010年8月20日
摘要: [代码]推荐HDOJ题目http://acm.hdu.edu.cn/showproblem.php?pid=1907http://acm.hdu.edu.cn/showproblem.php?pid=2509看完上面的结论,就能顺利解决上面2道了S-Nimhttp://acm.hdu.edu.cn/showproblem.php?pid=1536http://acm.hdu.edu.cn/show... 阅读全文
posted @ 2010-08-20 09:50 MiYu 阅读(660) 评论(3) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--在一个集合中找到一个特别的条目是个很重要的问题,标准C++运行库提供了许多不同的搜索技术。在C++运行库中,指明一个集合的常用方法是通过iterator指示出区间。区间可以被写为[first,last... 阅读全文
posted @ 2010-08-20 09:38 MiYu 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/******************************************************************/检测一个无符号数是不为2^n-1(^为幂):x&(x+1... 阅读全文
posted @ 2010-08-20 09:27 MiYu 阅读(204) 评论(0) 推荐(0) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1253题目描述:[代码]Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0... 阅读全文
posted @ 2010-08-20 08:58 MiYu 阅读(443) 评论(0) 推荐(1) 编辑