HDU
jiang_16
一个想学好编程的弱渣妹纸,猎奇,脑洞向...
展开
-
VJ组队赛->Almost Sorted Array(5532)
Problem DescriptionWe are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. But sometimes it is an overkill to use these algo原创 2017-06-13 11:31:41 · 335 阅读 · 0 评论 -
I Hate It 单点修改和区间查询
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0学生ID编号分别从1编到N。 第二原创 2017-09-09 23:52:25 · 178 阅读 · 0 评论 -
VJ组队赛->Dancing Stars on Me(5533)
Problem DescriptionThe sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky原创 2017-06-15 20:32:51 · 201 阅读 · 0 评论 -
A + B Problem II(1002)
Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe first line of the input contains an integer T(1<=T<原创 2017-06-13 20:53:00 · 209 阅读 · 0 评论 -
Count the string next数组+DP
It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example:s: "abab原创 2017-10-12 21:38:06 · 195 阅读 · 0 评论 -
Cyclic Nacklace next数组应用
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to原创 2017-10-11 20:50:34 · 160 阅读 · 0 评论 -
A计划
可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位置用P表示,时空传输机用#表示,墙用*原创 2017-08-04 10:17:16 · 601 阅读 · 0 评论 -
Fire UVA
直接放题目链接吧UVA11624一开始比较犯晕,不知道怎么下手,因为火和人都在动,后来看了眼分析瞬间有了思路,人是受火的牵制的,先让火自由蔓延,即先对火跑一遍BFS,得到火到达每一块地方的时间,然后人再跑一遍BFS,根据火到达每一块地方的时间来判断能不能走,只要越过边界就直接退出,即得到了最小时间。需要注意的是,着火点F不止有一个,一开始我对每一个F点都跑一遍BFS,意料之中超时,然后改进原创 2017-08-03 21:22:34 · 180 阅读 · 0 评论 -
非常可乐
大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S Input三个整数 : S 可乐的体积 , N 和 M是两个杯子的容量,以"0 0 0"原创 2017-08-01 11:18:07 · 175 阅读 · 0 评论 -
Can you answer these queries? 区间更新和查询
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of end原创 2017-09-17 22:04:03 · 166 阅读 · 0 评论 -
Max Sum Plus Plus m段连续子序列最大和
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem.Giv原创 2017-08-28 18:03:03 · 415 阅读 · 0 评论 -
免费馅饼
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝原创 2017-08-22 21:48:18 · 168 阅读 · 0 评论 -
第四届图灵杯->How Many Fibs?(1316)
Problem DescriptionRecall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n >= 3) Given two numbers a and b, calculate how many Fibonacci numbers are in the ran原创 2017-06-13 09:34:58 · 400 阅读 · 0 评论 -
VJ组队赛->Chip Factory(5536)
Problem DescriptionJohn is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically,原创 2017-06-14 17:23:55 · 187 阅读 · 0 评论 -
VJ组队赛->House Building(5538)
额..... 题目太长我就不贴了,就是给你一个二维数组,a[i][j]代表(i,j)位置木块的高度,然后让你求 i x j 这个范围内所有木块的表面积之和,具体如下图InputThe first line contains an integer T indicating the total number of test cases.First line of each原创 2017-06-14 22:06:44 · 198 阅读 · 0 评论 -
Wireless Network
An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the n原创 2017-08-16 15:42:23 · 159 阅读 · 0 评论 -
How Many Tables
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, a原创 2017-08-16 15:38:55 · 152 阅读 · 0 评论 -
Is It A Tree?
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.Th原创 2017-08-16 15:52:45 · 180 阅读 · 0 评论 -
Max Sum 最大连续子序列和
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +原创 2017-06-13 20:23:23 · 342 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping! LIS
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The g原创 2017-08-26 13:58:36 · 215 阅读 · 0 评论 -
Find a way
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfei’s home is at the co原创 2017-07-31 17:23:17 · 203 阅读 · 0 评论