• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






hebozi

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2012年8月5日

HDU 1711 Number Sequence KMP
摘要: Number SequenceTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5851Accepted Submission(s): 2631Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 100 阅读全文
posted @ 2012-08-05 21:36 hebozi 阅读(102) 评论(0) 推荐(0)
 
HDU 2642 Stars 二维树状数组
摘要: StarsTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/65536 K (Java/Others)Total Submission(s): 628Accepted Submission(s): 268Problem DescriptionYifenfei is a romantic guy and he likes to count the stars in the sky.To make the problem easier,we considerate the sky is a two-dimension plane.S 阅读全文
posted @ 2012-08-05 21:34 hebozi 阅读(162) 评论(0) 推荐(0)
 
HDU 1892 See you~ 二维树状数组
摘要: See you~Time Limit: 5000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2023Accepted Submission(s): 645Problem DescriptionNow I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good 阅读全文
posted @ 2012-08-05 21:32 hebozi 阅读(194) 评论(0) 推荐(0)
 
DFS+路径存储
摘要: King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 525Accepted Submission(s): 111Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have known 阅读全文
posted @ 2012-08-05 21:30 hebozi 阅读(298) 评论(0) 推荐(0)
 
HDU 4334 Trouble 哈希链表法||夹逼法||set的应用
摘要: TroubleTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2284Accepted Submission(s): 726Problem DescriptionHassan is in trouble. His mathematics teacher has given him a very difficult problem called 5-sum. Please help him.The 5-sum problem is define 阅读全文
posted @ 2012-08-05 21:28 hebozi 阅读(235) 评论(0) 推荐(0)
 
所有的STL容器
摘要: 所有的STL容器 容器(Container)的概念的出现早于模板(template),它原本是一个计算机科学领域中的一个重要概念,但在这里,它的概念和STL混合在一起了。下面是在STL中出现的7种容器: vector(向量)——STL中标准而安全的数组。只能在vector 的“前面”增加数据。 deque(双端队列double-ended queue)——在功能上和vector相似,但是可以在前后两端向其中添加数据。 list(列表)——游标一次只可以移动一步。如果你对链表已经很熟悉,那么STL中的list则是一个双向链表(每个节点有指向前驱和指向后继的两个指针)。 set(集合)—... 阅读全文
posted @ 2012-08-05 21:20 hebozi 阅读(188) 评论(0) 推荐(0)
 
Primes
摘要: PrimesTimeLimit:3000MSDescriptionInapavilion,visitorswillgetahithertounknowncutting-edgeinteractiveexperience,afieldfullofimaginationandthejoyoftheinformationcommunicationinteractiveexperienceshowwillbeanewform,fromtheaudienceintotheexhibitionhallofthefirststep,willandhandheldterminalsareinseparable 阅读全文
posted @ 2012-08-05 21:17 hebozi 阅读(220) 评论(0) 推荐(0)
 
住房安排
摘要: 住房安排TimeLimit:3000MSDescription第三十届夏季奥林匹克运动会于2012年7月27日至8月12日在英国首都伦敦举行,历时19天。为了更好地接待在这期间来自世界各地的参赛者,如何合理安排各宾馆的住房问题提到了日程。组委会已接到了大量的客户住宿定单,每张定单的内容包括要住宿的房间数,开始住宿时间和要住的天数。为了便于整个城市各宾馆的管理,组委会希望对这些定单进行安排,目的是用尽可能少的房间来满足这些定单,以便空出更多的房间用于安排流动游客。组委会请求Jenny来完成这个任务,对这些定单进行合理安排,使得满足这些定单要求的房间数最少。假设某个定单上的游客一旦被安排到某房间, 阅读全文
posted @ 2012-08-05 21:14 hebozi 阅读(144) 评论(0) 推荐(0)
 
HDU 1870 愚人节的礼物 栈的应用
摘要: 愚人节的礼物Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2194Accepted Submission(s): 1387Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚 阅读全文
posted @ 2012-08-05 11:58 hebozi 阅读(250) 评论(0) 推荐(0)
 
HOJ 2430 Counting the algorithms 树状数组+MAP的应用
摘要: Counting the algorithmsMy Tags(Edit) Cancel - Seperate tags with commas.Source : mostlegTime limit : 1 secMemory limit : 64 MSubmitted : 492, Accepted : 190As most of the ACMers, wy's next target is algorithms, too. wy is clever, so he can learn most of the algorithms quickly. After a short time 阅读全文
posted @ 2012-08-05 11:56 hebozi 阅读(160) 评论(0) 推荐(0)
 
HOJ 1867 经理的烦恼 一维树状数组
摘要: 经理的烦恼My Tags(Edit) Cancel - Seperate tags with commas.Source : HCPC 2005 SpringTime limit : 2 secMemory limit : 32 MSubmitted : 1929, Accepted : 442Jerry是一家公司销售部门的经理。这家公司有很多连锁店,编号为1,2,3,... Jerry每天必须关注每家连锁店的商品数量及其变化,一项很乏味的工作。在连锁店比较少的时候,Jerry喜欢计算编号在[i,j]区间内的连锁店中商品数量为素数的有多少家,但是现在连锁店的数量急剧增长,计算量很大,J... 阅读全文
posted @ 2012-08-05 11:54 hebozi 阅读(186) 评论(0) 推荐(0)
 
HDU 3450 Counting Sequences 树状数组+DP
摘要: Counting SequencesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/65536 K (Java/Others)Total Submission(s): 1158Accepted Submission(s): 397Problem DescriptionFor a set of sequences of integers{a1,a2,a3,...an}, we define a sequence{ai1,ai2,ai3...aik}in which 1<=i1<i2<i3<...<i 阅读全文
posted @ 2012-08-05 11:40 hebozi 阅读(153) 评论(0) 推荐(0)
 
水饺基情 二维树状数组
摘要: 水饺基情TimeLimit:3000/1000ms(Java/Other)MemoryLimit:65535/32768K(Java/Other)TotalSubmission(s):43AcceptedSubmission(s):4Font:TimesNewRoman|Verdana|GeorgiaFontSize:←→ProblemDescription在看完植物大战僵尸后,雄哥强烈要求zzy在203留宿,地点就在雄哥的睡袋上。是不是很基情??长夜漫漫无心睡眠,雄哥拿出了积攒已久的一盒水饺,(因为饿了==)。半夜三更,四下无人,zzy和雄哥决定把水饺吃掉,但是!他们玩了一个十分基情的游戏。 阅读全文
posted @ 2012-08-05 11:37 hebozi 阅读(163) 评论(0) 推荐(0)
 
最大匹配+vector的应用
摘要: 非诚勿扰Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 134Accepted Submission(s) : 15Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description某卫视新推一档类似“非诚勿扰”的征婚交友节目,每期节目均有N名男生和N名女生。节目开始前每人都要给出自己的薪水和对另一半的薪水期望(比自己高或者比自己低)。一名男生只能和一名女生配对,并 阅读全文
posted @ 2012-08-05 11:02 hebozi 阅读(207) 评论(0) 推荐(0)
 
单词的前缀 字典树
摘要: 单词的前缀TimeLimit:3000/1000ms(Java/Other)MemoryLimit:65535/32768K(Java/Other)TotalSubmission(s):167AcceptedSubmission(s):46Font:TimesNewRoman|Verdana|GeorgiaFontSize:←→ProblemDescriptionZZY针对某个单词表给单词定义了特别的前缀,该前缀使得在该表中可以唯一标识某个单词,并且前缀的长度是最短。若有单词是另一个单词的前缀,那么该单词的前缀就是其本身。Input输入包含多组数据,对于每组数据,第一行是整数N(1~1000) 阅读全文
posted @ 2012-08-05 10:54 hebozi 阅读(337) 评论(0) 推荐(0)
 
求三角形内包括边上的点的数目
摘要: 三角形TimeLimit:3000/1000ms(Java/Other)MemoryLimit:65535/32768K(Java/Other)TotalSubmission(s):137AcceptedSubmission(s):90Font:TimesNewRoman|Verdana|GeorgiaFontSize:←→ProblemDescription平面上有x+2*y=N,x=0以及y=0三线围成的一个直角三角形,请帮忙计算该三角形内(包括边上)的整点的个数,其中整点表示x,y都取整数的点。Input第一行输入一整数T,表示有T组测试数据,接下来有T行,每行输入一个数N.(1< 阅读全文
posted @ 2012-08-05 10:40 hebozi 阅读(455) 评论(0) 推荐(0)
 
HDU 4325 Flowers
摘要: FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1022Accepted Submission(s): 513Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. Th 阅读全文
posted @ 2012-08-05 10:32 hebozi 阅读(128) 评论(0) 推荐(0)
 
HDU 4324 Triangle LOVE
摘要: Triangle LOVETime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1033Accepted Submission(s): 425Problem DescriptionRecently, scientists find that there is love between any of two people. For example, between A and B, if A don’t love B, then B must love 阅读全文
posted @ 2012-08-05 10:28 hebozi 阅读(138) 评论(0) 推荐(0)
 
HDU 4320 Arcane Numbers 1 判断两个数的质因子是否完全相同
摘要: Arcane Numbers 1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1666Accepted Submission(s): 527Problem DescriptionVance and Shackler like playing games. One day, they are playing a game called "arcane numbers". The game is pretty simple, 阅读全文
posted @ 2012-08-05 10:24 hebozi 阅读(189) 评论(0) 推荐(0)
 
HUD 4339 Query 树状数组+二分查询
摘要: QueryTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1267Accepted Submission(s): 391Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:1) 1 a i c - you should set i-th c 阅读全文
posted @ 2012-08-05 10:16 hebozi 阅读(127) 评论(0) 推荐(0)