
训练
文章平均质量分 69
yhwqeioyqewqiweq
这个作者很懒,什么都没留下…
展开
-
hdu 1024 Max Sum Plus Plus
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. Given ...原创 2018-06-11 18:50:10 · 107 阅读 · 0 评论 -
HDU - 6230 Palindrome
Alice like strings, especially long strings. For each string, she has a special evaluation system to judge how elegant the string is. She defines that a string S[1..3n−2](n≥2)S[1..3n−2](n≥2) is one-an...原创 2018-09-28 18:28:54 · 240 阅读 · 0 评论 -
饥荒:进阶·放火烧树
描述 饥荒:放火烧树是一个奥妙重重的游戏。TanYz是饥荒的老司机,为了得到木炭点火,不得不放火烧树。老司机TanYz为了生存,还要节约资源。他知道一次只能将一棵树木点燃。而且,当一棵树被点燃后,与这棵树距离不超过k的所有树木都会被点燃。自从TanYz把这个奥妙重重的游戏安利给萌新zhuyutian后,他觉得放火烧山这种粗活太没意思。于是他把这个任务交给了zhuyutian。于是,...原创 2018-11-03 11:43:26 · 4855 阅读 · 0 评论 -
HDU - 1827 Summer Holiday
To see a World in a Grain of SandAnd a Heaven in a Wild Flower,Hold Infinity in the palm of your handAnd Eternity in an hour. —— William Blake听说lcy帮大家预定了新马泰7日游,Wiskey真是高兴的夜不能寐啊,他...原创 2018-11-01 20:54:19 · 167 阅读 · 0 评论 -
HDU - 1175 连连看
“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外围绕过。 玩家鼠标...原创 2018-11-04 09:39:04 · 283 阅读 · 0 评论 -
HDU - 1180 诡异的楼梯
Hogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线,这时Ron(Harry最好的朋友)告诉Harry正好有一个魔法道具可以帮助他寻找这样的路线,而那个魔法道具上...原创 2018-11-04 11:45:21 · 192 阅读 · 0 评论 -
custoj 233-很有趣的一道题
描述 lzp喜欢搞笑数,所有搞笑的数都非常地搞笑,比如23333、233333、2333333。所以说,一个搞笑数的每位上只能出现2或3现给定一个正整数n,求一个搞笑数x,要求x是n的整数倍。输入 多组数据每行一个正整数n,n<=100000输出 对于每组数据,输出一个搞笑数x,x的位数不能超过500若不存在这样的搞笑数,输出Unhappy输入样例...原创 2018-11-07 17:49:32 · 605 阅读 · 0 评论 -
ZOJ - 3329 One Person Game
There is a very simple and interesting one-person game. You have 3 dice, namelyDie1,Die2andDie3.Die1hasK1faces.Die2hasK2faces.Die3hasK3faces. All the dice are fair dice, so the probabi...原创 2019-03-19 20:23:59 · 236 阅读 · 0 评论 -
ZOJ - 3640 Help Me Escape
BackgroundIf thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him.And Cain talked...原创 2019-03-24 19:57:54 · 405 阅读 · 0 评论 -
POJ - 2096 Collecting Bugs
Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he classifies all possible bugs into n ...原创 2019-03-19 19:02:17 · 218 阅读 · 0 评论 -
HDU - 3853 LOOPS
Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world. But because of the plot of the Boss Incubator, she is trapped in a labyrinth called L...原创 2019-03-23 15:59:37 · 158 阅读 · 0 评论 -
CodeForces - 148D Bag of mice
The dragon and the princess are arguing about what to do on the New Year's Eve. The dragon suggests flying to the mountains to watch fairies dancing in the moonlight, while the princess thinks they sh...原创 2019-03-23 19:56:55 · 216 阅读 · 0 评论 -
POJ - 3071 Football
Consider a single-elimination football tournament involving 2nteams, denoted 1, 2, …, 2n. In each round of the tournament, all teams still in the tournament are placed in a list in order of increasin...原创 2019-03-23 21:02:21 · 232 阅读 · 0 评论 -
HDU - 6231 K-th Number
Alice are given an array A[1..N]A[1..N] with NN numbers. Now Alice want to build an array BB by a parameter KK as following rules: Initially, the array B is empty. Consider each interval in array A....原创 2018-09-25 19:07:59 · 244 阅读 · 0 评论 -
HDU - 6235 Permutation
A permutation p1,p2,...,pnp1,p2,...,pn of 1,2,...,n1,2,...,n is called a lucky permutation if and only if pi≡0(mod|pi−pi−2|)pi≡0(mod|pi−pi−2|) for i=3...ni=3...n. Now you need to construct a lucky pe...原创 2018-09-23 19:56:19 · 462 阅读 · 0 评论 -
HDU 1260 Tickets
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as...原创 2018-06-09 19:47:04 · 218 阅读 · 0 评论 -
POJ3186 Treats for the Cows
FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given p...原创 2018-06-12 19:05:23 · 145 阅读 · 0 评论 -
hdu 2859 Phalanx
Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of the PRC. A phalanx is a matrix of size n*n, each element is a character (a~z or A~Z), sta...原创 2018-06-12 20:52:45 · 280 阅读 · 0 评论 -
hdoj 1257 最少拦截系统 dp?
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统....原创 2018-06-06 14:23:20 · 178 阅读 · 0 评论 -
HDU 1029 Ignatius and the Princess IV
"OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tel...原创 2018-06-06 15:57:46 · 135 阅读 · 0 评论 -
HDU1114 Piggy-Bank
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple...原创 2018-06-13 20:23:34 · 180 阅读 · 0 评论 -
hdu 1069 Monkey and Banana
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monk...原创 2018-06-06 20:17:33 · 146 阅读 · 0 评论 -
hdu 1087 Super Jumping! Jumping! Jumping!
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 game can b...原创 2018-06-06 21:29:34 · 139 阅读 · 0 评论 -
POJ 1458 Common Subsequence(最长公共子序列LCS)
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a ...原创 2018-06-07 20:46:23 · 165 阅读 · 0 评论 -
POJ 2533 Longest Ordered Subsequence 可以说是非常简单的dp了
A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, ai2, ..., aiK), where 1 <= i1 < i2...原创 2018-06-07 21:14:44 · 215 阅读 · 0 评论 -
HDU-1160 FatMouse's Speed
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence...原创 2018-06-14 21:11:52 · 281 阅读 · 0 评论 -
HDU 1176 免费馅饼
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝...原创 2018-06-08 19:48:17 · 100 阅读 · 0 评论 -
HDU 1078 FatMouse and Cheese
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid lo...原创 2018-06-15 21:04:54 · 135 阅读 · 0 评论 -
POJ 3616 Milking Time
Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1) so that she...原创 2018-06-09 16:06:43 · 113 阅读 · 0 评论 -
HDU - 4336 Card Collector
In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in the famous novel Water Margin, you will win an amazi...原创 2019-03-26 19:44:05 · 200 阅读 · 0 评论