![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDU
文章平均质量分 73
Double.Qing
这个作者很懒,什么都没留下…
展开
-
HDU 6979 Photoshop Layers
Pixels in a digital picture can be represented with three integers (R,G,B) in the range 0 to 255 that indicate the intensity of the red, green, and blue colors. The color of a pixel can be expressed as a six-digit hexadecimal capital string. For example, (原创 2022-09-02 22:14:30 · 104 阅读 · 0 评论 -
HDU 6277 Higher h-index
The h-index of an author is the largest h where he has at least h papers with citations not less than h.Bobo has no papers and he is going to publish some subsequently.If he works on a paper for x hours, the paper will get (a⋅x) citations, where a is a原创 2022-09-01 21:23:46 · 127 阅读 · 0 评论 -
HDU 6286 2018
Given a,b,c,d, find out the number of pairs of integers (x,y) where a≤x≤b,c≤y≤d and x⋅y is a multiple of 2018. InputThe input consists of several test cases and is terminated by end-of-file.Each test case contains four integers a,b,c,d.原创 2022-09-01 21:21:10 · 115 阅读 · 0 评论 -
HDU 6276 Easy h-index
The h-index of an author is the largest h where he has at least h papers with citations not less than h.Bobo has published many papers.Given a0,a1,a2,…,an which means Bobo has published ai papers with citations exactly i, find the h-index of Bobo.原创 2022-09-01 21:17:00 · 72 阅读 · 0 评论 -
HDU 4119 Isabella‘s Message
Steve didn't know which direction of the mask should be chosen at the beginning, but after he tried all possibilities, he found that the message "good morning" is the only one he wanted because he couldn't recognize some words in the other messages. So he原创 2022-08-31 11:30:33 · 113 阅读 · 0 评论 -
HDU 4112 Break the Chocolate
Benjamin is going to host a party for his big promotion coming up.Every party needs candies, chocolates and beer, and of course Benjamin has prepared some of those. But as everyone likes to party, many more people showed up than he expected. The good news原创 2022-08-31 11:01:11 · 95 阅读 · 0 评论 -
HDU 4727 The Number Off of FFF
Problem DescriptionX soldiers from the famous "*FFF* army" is standing in a line, from left to right.You, as the captain of *FFF*, decides to have a "number off", that is, each soldier, from left to right, calls out a number. The first soldier should ca原创 2022-08-30 16:38:15 · 58 阅读 · 0 评论 -
HDU 4722 Good Numbers
Problem DescriptionIf we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good number.You are required to count the number of good numbers in the range from A to B, inclusive.原创 2022-08-30 16:35:21 · 54 阅读 · 0 评论 -
HDU 4716 A Computer Graphics Problem
In this problem we talk about the study of Computer Graphics. Of course, this is very, very hard.We have designed a new mobile phone, your task is to write a interface to display battery powers.Here we use '.' as empty grids.When the battery is empty, t原创 2022-08-30 16:31:33 · 79 阅读 · 0 评论 -
HDU 4608 I-number
The I-number of x is defined to be an integer y, which satisfied the the conditions below:1. y>x;2. the sum of each digit of y(under base 10) is the multiple of 10;3. among all integers that satisfy the two conditions above, y shouble be the minimum.Gi原创 2022-08-29 19:51:09 · 56 阅读 · 0 评论 -
HDU 4386 Quadrilateral
One day the little Jack is playing a game with four crabsticks. The game is simple, he want to make all the four crabsticks to be a quadrilateral, which has the biggest area in all the possible ways. But Jack’s math is so bad, he doesn’t know how to do it,原创 2022-08-29 19:46:08 · 63 阅读 · 0 评论 -
HDU 4324 Triangle LOVE
Recently, 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 A, vice versa. And there is no possibility that two people love each other, what a crazy world!Now, scientists want t原创 2022-08-29 19:40:04 · 98 阅读 · 0 评论 -
HDU 4302 Holedox Eating
Holedox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can only move along the pipe. Cakes may appear anywhere in the pipe, from time to time. When Holedox wants to eat cakes, it always goes t原创 2022-08-29 19:35:59 · 81 阅读 · 0 评论 -
HDU 4310 Hero
题意:给定n个敌方英雄给出其攻击力和血量,你拥有无限的血量,敌方每次给你造成的伤害为敌方现存英雄伤害的总和,问消灭所有敌方英雄所花费的最小代价是多少。题意:给定n个敌方英雄给出其攻击力和血量,你拥有无限的血量,敌方每次给你造成的伤害为敌方现存英雄伤害的总和,问消灭所有敌方英雄所花费的最小代价是多少。思路:计算出每个敌方英雄攻击力与血量的比值,比值越高的代表在相应的血量下造成的损害越多,因此要先消灭比值高的;于是我们将敌方英雄按比值排序即可。...原创 2022-08-29 19:25:47 · 59 阅读 · 0 评论 -
HDU 6898 3x3 Convolution
Given an n×n matrix A and a 3×3 matrix K. These two matrices are very special : they are both non-negative matrices and the sum of all elements in matrix K is 1 (In order to avoid floating-point error, we will give matrix K in a special way in input).Now原创 2022-08-28 10:09:25 · 57 阅读 · 0 评论 -
HDU 6897 Reports
Because of Covid-19, Kanade needs to report every time when entering and leaving school. Now you want to check if Kanade's reports on a certain day are correct.A sequence of reports is correct if and only if there does not exist two consecutive and same原创 2022-08-28 10:06:07 · 47 阅读 · 0 评论 -
HDU 6894 CCPC Training Class
Baby volcano is helping his CCPC coach preparing a new CCPC training contest. He wants to generate high quality data on border tree(There is no need to know what border tree is), but he encounters some troubles. Could you please help him?原创 2022-08-28 10:03:34 · 115 阅读 · 0 评论 -
HDU 6890 Express Mail Taking
题意:有一排快递柜编号为1到n,一共有m个快递,还有一个密码柜位于k,每次取快递都必须先到密码柜输入密码才能取到快递,相邻两个柜子之间的距离为1,问取走所有快递需要移动的最短距离是多少;题意:有一排快递柜编号为1到n,一共有m个快递,还有一个密码柜位于k,每次取快递都必须先到密码柜输入密码才能取到快递,相邻两个柜子之间的距离为1,问取走所有快递需要移动的最短距离是多少;思路:1、先读入所有快递的位置然后对其从小到大排序,每次取快递都必须在对应快递柜和k之间往返一次,即答案加上2*abs(a[i]-k);..原创 2022-08-28 09:58:17 · 77 阅读 · 0 评论 -
HDU 7108 Command Sequence
题意:给定一个命令序列,分别控制机器人向上下左右四个方向移动,求有多少个命令序列的子序列可以使机器人回到原点InputOutput1 6 URLLDR2。原创 2022-08-27 10:17:59 · 72 阅读 · 0 评论 -
HDU 7105 Power Sum
思路:经过分析可以发现"1001"为4、"1"为1、"0001"为2、"01"为3;于是对于任何n都可以通过01串构造出来;题意:给定一个n,要求找到一个长度为k的数组,使得。题意:给定一个n,要求找到一个长度为k的数组,使得。...原创 2022-08-27 10:11:43 · 75 阅读 · 0 评论 -
HDU 7100 Cut The Wire
题意:对于一个点x,如果编号为偶数那么x与x/2连通,如果为偶数那么x和3*x+1连通;给定一个编号n,克里斯站在n和n+1之间,同时斩断所有通过n和n+1的边,问将斩断多少边。给定一个编号n,克里斯站在n和n+1之间,同时斩断所有通过n和n+1的边,问将斩断多少边。思路:不论n是偶数还是奇数,总之n/2到n之间所有偶数点的边都将被切断,当n为奇数时,斩断的奇数边为(n-(n-1)/3)/2条,如果为偶数则为(n-(n-1)/3)/2条。...原创 2022-08-27 09:59:36 · 143 阅读 · 0 评论 -
HDU 6463 超级无敌简单题
有分析可以得出数字总是在循环的,因此我们只需记录下来由一个数字出发到达的第一个被标记的数字为止的所有数,如果第一个被标记的数为鸽子数,那么有该数字出发的所有数都为鸽子数,反之亦然。先通过st数组记录每个数字的状态,遍历完以后将所有鸽子数转存到b数组中,temp数组存储由某一数字出发到第一个被标记的数字的路径上的所有数字;鸽子数字由以下过程定义:从任何正整数开始,将数字替换为其各个数位的平方和,并重复该过程,直到该数字等于1。通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长。...原创 2022-08-26 10:37:59 · 81 阅读 · 0 评论 -
HDU 6462 人类史上最大最好的希望事件
例如,0+0 到 0 + 1 意即从第一个方格转到第二个方格,划过了前两个方格,他们的面积之和为2(1+1)。同理,0+0 到 1+0 划过了前五个方格,他们的面积之和为40(1+1+4+9+25)。但是聪明的狗哥需要一个程序去获得指定范围内的螺旋线面积之和,狗哥给了你一首「希望之花」的时间,而他需要利用这个时间去打出四暗刻单骑。狗哥觉得这就是找寻「生命,宇宙和一切的终极答案」的精要所在,但是怎么表示呢?接下来Q行,每行四个整数a,b,c,d,代表狗哥想求 a+b 到 c+d 之间的螺旋线面积之和。...原创 2022-08-26 10:31:23 · 53 阅读 · 0 评论 -
HDU 6461 hzy 和zsl 的生存挑战
现在大魔王hyz 给出的数字可能的情况有 00, 01, 10, 11 四种,请按上述枚举的顺序,计算所有情况下zsl 和hzy 通关的几率。3. zsl 和 hzy 需要猜对这俩个数字才算通关,但是大魔王hyz觉得人生不能过于无敌,因此降低难度,只要两个人中有一个人答对就算是通关。输出四个答案,每个答案后面跟随一个换行符并且保留两位小数位,分别对应00,01,10,11的情况下,zsl和hzy通关的几率。0.55 (输出仅做格式参考,不保证正确性)...原创 2022-08-26 10:27:48 · 50 阅读 · 0 评论 -
HDU 7053 Smzzl with Tropical Taste
题意:给定一个无限容量的水池,以及店家向水池中加茶的速度和smzzl喝茶的速度,问是否对于任意体积G>0,总存在一个时刻T对于任何t>T,在t时刻smzzl喝的茶的体积总是大于G;思路:只要店家添加茶的速度不小于smzzl喝茶的速度即水池里面的茶不会变少那么就肯定存在这样的时刻T;原创 2022-08-23 10:03:50 · 58 阅读 · 0 评论 -
HDU 7051 Smzzl with Greedy Snake
题意:给定一个二维平面,以及蛇头最初所在的坐标和方向,然后食物以吃掉一个出现一个的方式出现在平面上,求吃完所有食物的最短路径;题意:给定一个二维平面,以及蛇头最初所在的坐标和方向,然后食物以吃掉一个出现一个的方式出现在平面上,求吃完所有食物的最短路径;思路:由于食物不是一次性出现的,所以最短路径就与距离无关了,影响最短路径的只有方向转换的方式,于是可以通过模拟得到答案;1、通过两次模拟,一次先走x方向,另一次 先走y方向;2、将两次得到路径长度进行对比,选择较短的路径;3、更新蛇头位置及方向;原创 2022-08-23 09:53:00 · 71 阅读 · 0 评论 -
HDU 6914 Problem Select(“红旗杯”第十四届吉林省大学生程序设计竞赛 )
思路:将每个网址的最后一个‘/’后的数字提取,进行排序后按要求输出即可。思路:将每个网址的最后一个‘/’后的数字提取,进行排序后按要求输出即可。原创 2022-08-20 15:11:57 · 166 阅读 · 0 评论 -
HDU 6913 Chord(“红旗杯”第十四届吉林省大学生程序设计竞赛 )
【代码】HDU 6913 Chord(“红旗杯”第十四届吉林省大学生程序设计竞赛 )原创 2022-08-20 15:05:52 · 391 阅读 · 0 评论 -
HDU5934 Bomb(2016年中国大学生程序设计竞赛(杭州) )
我又开始分析题意,发现所有可以相互引爆的点可以构成一个连通分量,于是我开始往强连通分量上靠拢,将一个连通分量缩小为一个点,这个点的引爆阈值为连通分量内阈值的最小值,最后将每个缩点过后的点阈值相加即可得到答案。思路:之前做过一个一模一样的题,但是那个题我直接用暴力深搜就能过,于是这一次做题时我采用了同样的方法结果TLE了,证明暴力过不了被卡了。思路:之前做过一个一模一样的题,但是那个题我直接用暴力深搜就能过,于是这一次做题时我采用了同样的方法结果TLE了,证明暴力过不了被卡了。原创 2022-08-19 21:04:35 · 76 阅读 · 0 评论