自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(59)
  • 收藏
  • 关注

原创 怀化学院第十五届大学生计算机程序设计竞赛题解

怀化学院第十五届大学生程序设计竞赛题解

2023-09-14 22:00:00 254

原创 牛客 NC20284 [SCOI2011]糖果

幼儿园里有N个小朋友,lxhgww老师现在想要给这些小朋友们分配糖果,要求每个小朋友都要分到糖果。但是小朋友们也有嫉妒心,总是会提出一些要求,比如小明不希望小红分到的糖果比他的多,于是在分配糖果的时候,lxhgww需要满足小朋友们的K个要求。幼儿园的糖果总是有限的,lxhgww想知道他至少需要准备多少个糖果,才能使得每个小朋友都能够分到糖果,并且满足小朋友们所有的要求。

2022-09-08 21:12:45 129 1

原创 牛客 NC16697 [NOIP2001]Car的旅行路线

又到暑假了,住在城市A的Car想和朋友一起去城市B旅游。她知道每个城市都有四个飞机场,分别位于一个矩形的四个顶点上,同一个城市中两个机场之间有一条笔直的高速铁路,第I个城市中高速铁路了的单位里程价格为Ti,任意两个不同城市的机场之间均有航线,所有航线单位里程的价格均为t。

2022-09-07 21:33:47 150

原创 牛客 NC24948 [USACO 2008 Jan S]Cow Contest

N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is unique among the competitors.The contest is conducted in

2022-09-06 20:24:17 133

原创 牛客 NC25064 [USACO 2007 Mar G]Ranking the Cows

Each of Farmer John's N cows (1 ≤ N ≤ 1,000) produces milk at a different positive rate, and FJ would like to order his cows according to these rates from the fastest milk producer to the slowest.FJ has already compared the milk output rate for M (1 ≤ M ≤

2022-09-06 20:21:08 108

原创 牛客 NC16466 [NOIP2015]信息传递

有 n 个同学(编号为 1 到 n)正在玩一个信息传递的游戏。在游戏里每人都有一个固定的信息传递对象,其中,编号为 i 的同学的信息传递对象是编号为Ti的同学。游戏开始时,每人都只知道自己的生日。之后每一轮中,所有人会同时将自己当前所知的生日信息告诉各自的信息传递对象(注意:可能有人可以从若干人那里获取信息, 但是每人只会把信息告诉一个人,即自己的信息传递对象)。当有人从别人口中得知自己的生日时,游戏结束。请问该游戏一共可以进行几轮?

2022-09-05 21:23:39 84

原创 牛客 NC212331 ObstacleCourse障碍训练课

考虑一个 N x N (1

2022-09-05 21:20:21 94

原创 2022百度之星初赛第三场--字符计数

在一张白色背景的图像上,有一些色的字符。小度发现这些字符可以分成三类:不含任何洞的字符”1”,含个洞的字符"0”,含两个洞的字符“8”。现在, 用"示色背景,用"#" 示背景上的艷字迹,小度想问问你,这三类字符各有多少个?保证字符之间互不嵌套或重叠,字符的各个洞的位置不重叠,字符的每个"#"之间四联通。格式输入格式:第一行两个整数n(1 ≤n≤1000)和m(1≤n≤1000)。随后n行,每行m个字符,示该该白图像。输出格式:输出一行三个整数,分别表示”1” 的个数、"0” 的个数和"8” 的

2022-09-04 19:20:12 846 1

原创 2022百度之星初赛第三场-三个因子

小度学数学时遇到困难,请你帮帮他。我们知道,恰好有两个正因子的数是质数。现在小度突发奇想,他想判断一个数是不是恰好有三个因子?给定n个正整数,请你分别判断它们是否恰好有三个不同的正因子

2022-09-04 19:15:33 914

原创 牛客 NC208246 胖胖的牛牛

每逢佳节胖三斤,牛牛在过去的节日里长胖了,连拐弯都困难,甚至会卡在门上,所以他很讨厌拐弯。给你一个N*N(2≤N≤100)的方格中,‘x’表示障碍,‘.’表示没有障碍(可以走),牛牛可以从一个格子走到他相邻的四个格子,但是不能走出这些格子。问牛牛从A点到B点最少需要转90度的弯几次。

2022-09-03 22:36:28 151

原创 牛客 NC25020 [USACO 2007 Nov S]Cow Hurdles

Farmer John wants the cows to prepare for the county jumping competition, so Bessie and the gang are practicing jumping over hurdles. They are getting tired, though, so they want to be able to use as little energy as possible to jump over the hurdles.Obvi

2022-09-03 22:32:12 116

原创 牛客 NC25005 [USACO 2008 Ope S]Clear And Present Danger

Farmer John is on a boat seeking fabled treasure on one of the N (1

2022-09-03 22:25:34 126

原创 牛客 NC25077 [USACO 2007 Ope B]Bronze Cow Party

One cow from each of N farms (1

2022-09-03 22:19:41 130

原创 牛客 NC24307 [USACO 2012 Dec S]Milk Routing

Farmer John's farm has an outdated network of M pipes (1

2022-09-03 22:12:02 124

原创 牛客 NC24755 [USACO 2010 Dec S]Apple Delivery

Bessie has two crisp red apples to deliver to two of her friends in the herd. Of course, she travels the C (1

2022-09-02 22:44:31 187

原创 牛客 NC24858 [USACO 2009 Nov S]Job Hunt

Bessie is running out of money and is searching for jobs. Farmer John knows this and wants the cows to travel around so he has imposed a rule that his cows can only make D (1

2022-09-02 22:39:38 139

原创 牛客 NC25080 Catch That Cow

Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0

2022-09-02 22:33:19 120

原创 牛客 NC26257 小雨坐地铁

小雨所在的城市一共有 mmm 条地铁线,分别标号为 1 号线,2 号线,……,m 号线。整个城市一共有 nnn 个车站,编号为 1∼n1 \sim n1∼n 。其中坐 i 号线需要花费 aia_iai​ 的价格,每坐一站就需要多花费 bib_ibi​ 的价格。i 号线有 cic_ici​ 个车站,而且这 cic_ici​ 个车站都已知,如果某一站有多条地铁线经过,则可以在这一站换乘到另一条地铁线,并且能多次换乘。现在小雨想从第 sss 个车站坐地铁到第 ttt 个车站,地铁等待时间忽略不计,求最少花费的价格

2022-09-02 22:27:57 197

原创 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 103

原创 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 126

原创 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 104

原创 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 70

原创 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 110

原创 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 92

原创 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 55

原创 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 50

原创 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 78

原创 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 53

原创 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 60

原创 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 94

原创 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 80

原创 HDU 4310 Hero

题意:给定n个敌方英雄给出其攻击力和血量,你拥有无限的血量,敌方每次给你造成的伤害为敌方现存英雄伤害的总和,问消灭所有敌方英雄所花费的最小代价是多少。题意:给定n个敌方英雄给出其攻击力和血量,你拥有无限的血量,敌方每次给你造成的伤害为敌方现存英雄伤害的总和,问消灭所有敌方英雄所花费的最小代价是多少。思路:计算出每个敌方英雄攻击力与血量的比值,比值越高的代表在相应的血量下造成的损害越多,因此要先消灭比值高的;于是我们将敌方英雄按比值排序即可。...

2022-08-29 19:25:47 55

原创 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 55

原创 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 43

原创 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 113

原创 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 75

原创 HDU 7108 Command Sequence

题意:给定一个命令序列,分别控制机器人向上下左右四个方向移动,求有多少个命令序列的子序列可以使机器人回到原点InputOutput1 6 URLLDR2。

2022-08-27 10:17:59 68

原创 HDU 7105 Power Sum

思路:经过分析可以发现"1001"为4、"1"为1、"0001"为2、"01"为3;于是对于任何n都可以通过01串构造出来;题意:给定一个n,要求找到一个长度为k的数组,使得。题意:给定一个n,要求找到一个长度为k的数组,使得。...

2022-08-27 10:11:43 74

原创 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 142

原创 HDU 6463 超级无敌简单题

有分析可以得出数字总是在循环的,因此我们只需记录下来由一个数字出发到达的第一个被标记的数字为止的所有数,如果第一个被标记的数为鸽子数,那么有该数字出发的所有数都为鸽子数,反之亦然。先通过st数组记录每个数字的状态,遍历完以后将所有鸽子数转存到b数组中,temp数组存储由某一数字出发到第一个被标记的数字的路径上的所有数字;鸽子数字由以下过程定义:从任何正整数开始,将数字替换为其各个数位的平方和,并重复该过程,直到该数字等于1。通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长。...

2022-08-26 10:37:59 80

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除