自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU-4414 Finding crosses

问题描述:The Nazca Lines are a series of ancient geoglyphs located in the Nazca Desert in southern Peru. They were designated as a UNESCO World Heritage Site in 1994. The high, arid plateau stretches more than 80 kilometres (50 mi) between the towns of Nazca

2021-03-31 13:15:16 186

原创 HDU - 4717 The Moving Points

问题描述:There are N points in total. Every point moves in certain direction and certain speed. We want to know at what time that the largest distance between any two points would be minimum. And also, we require you to calculate that minimum distance. We gu

2021-03-25 14:46:48 65

原创 HDU - 4004 The Frog‘s Games

问题描述:The annual Games in frogs’ kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Ironfrog Triathlon is jumping. This project requires the frog athletes to jump over the river. The width of the river is L (1<= L &l

2021-03-24 21:03:39 149 1

原创 HDU - 3714 Error Curves

问题描述:Josephina is a clever girl and addicted to Machine Learning recently. Shepays much attention to a method called Linear Discriminant Analysis, whichhas many interesting properties.In order to test the algorithm’s efficiency, she collects many data

2021-03-24 20:38:48 158

原创 HDU - 4282 A very hard mathematic problem

问题描述:Haoren is very good at solving mathematic problems. Today he is working a problem like this:  Find three positive integers X, Y and Z (X < Y, Z > 1) that holds   X^Z + Y^Z + XYZ = K  where K is another given integer.  Here the operator “^”

2021-03-24 19:35:12 119

原创 HDU - 1551 Cable master

问题描述:Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to connect computers for the contestants using a “star

2021-03-24 16:02:05 104

原创 HDU - 1969 Pie

问题描述:My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of them gets a piece of pie. This should be one piec

2021-03-24 15:46:36 113

原创 HDU - 2899 Strange fuction

问题描述:Now, here is a fuction:F(x) = 6 * x7+8*x6+7x3+5*x2-yx (0 <= x <=100)Can you find the minimum value when x is between 0 and 100.输入说明:The first line of the input contains an integer T(1<=T<=100) which means the number of test cases. T

2021-03-24 14:53:28 134

原创 HDU - 2199 Can you solve this equation?

问题描述:Now,given the equation 8x^4 + 7x^3 + 2x^2 + 3x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky.输入说明:The first line of the input contains an integer T(1<=T<=100) which means the number of test cases. Then T li

2021-03-24 14:23:15 93

原创 Codeforces Round #709 B.Restore Modulo

问题描述:传送门输入说明:输出说明:SAMPLE INPUT:661 9 17 6 14 334 2 237 3 432 2 450 1000000000 0 1000000000 021 1SAMPLEOUTPUT:19 8-1-1-12000000000 10000000000思路:昨晚刚打的cf,本蒟蒻被这道题卡死了………………hack结束后看了眼别人的代码,发现自己到底是有多菜…………其实不是特别难的一道题,题意就是一个数组,

2021-03-22 16:02:25 187 1

原创 POJ - 3253 Fence Repair

问题描述:Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ≤ 50,000) units. He then purchases a single long

2021-03-17 18:40:36 73

原创 POJ - 3287 The Trip, 2007

问题描述:A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, Atlanta, Eindhoven, Orlando, Vancouver, Honolulu, Beverly Hi

2021-03-17 18:24:37 183

原创 POJ - 1852 Ants

问题描述:An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ants meet they turn back and start walking in opposite directions.

2021-03-17 18:10:18 76

原创 POJ - 2620Minimal coverage

问题描述:Given set of line segments [Li , Ri] with integer coordinates of their end points. Your task is to find the minimal subset of the given set which covers segment [0,M] completely (M is a positive integer).输入说明:First line of the input contains numb

2021-03-17 17:36:38 187

原创 HDU - 1613 Ecological Bin Packing

问题描述:BackgroundBin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. Some bin packing problems are NP-complete but are amenable to dynamic programming solu

2021-03-17 17:18:42 169

原创 POJ - 3069 Saruman‘s Army

问题描述:Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes seeing stones, known as palantirs, among the troops. Each palantir has a maximum effective range of R units, an

2021-03-17 15:54:52 307

原创 POJ - 2393 Yogurt factory

问题描述:The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it will cost the company C_i (1 <= C_i <= 5,000) cents t

2021-03-17 15:10:01 87

原创 POJ - 3617 Best Cow Line

问题描述:FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.The contest organizers adopted a new registration scheme this year

2021-03-17 14:41:01 80

原创 5 单链表ADT模板简单应用算法设计:有序单链表的归并+提纯

问题描述:目的:使用C++模板设计单链表的抽象数据类型(ADT)。并在此基础上,使用单链表ADT的基本操作,设计并实现单链表的简单算法设计。内容:(1)请使用模板设计单链表的抽象数据类型。(由于该环境目前仅支持单文件的编译,故将所有内容都集中在一个源文件内。在实际的设计中,推荐将抽象类及对应的派生类分别放在单独的头文件中。参考网盘中的ADT原型文件。)(2)ADT的简单应用:使用该ADT设计并实现单链表应用场合的一些简单算法设计。应用6:假设2个线性表分别由单链表A和B存储,其中数据元素按值非递减

2021-03-12 20:41:41 985 2

原创 4 单链表ADT模板简单应用算法设计:单链表中前 m 个元素和后 n 个元素的互换

问题描述:目的:使用C++模板设计单链表的抽象数据类型(ADT)。并在此基础上,使用单链表ADT的基本操作,设计并实现单链表的简单算法设计。内容:(1)请使用模板设计单链表的抽象数据类型。(由于该环境目前仅支持单文件的编译,故将所有内容都集中在一个源文件内。在实际的设计中,推荐将抽象类及对应的派生类分别放在单独的头文件中。参考网盘中的ADT原型文件。)(2)ADT的简单应用:使用该ADT设计并实现单链表应用场合的一些简单算法设计。应用1:假设有一个带头结点的单链表A,现要求设计一个算法,实现单链表

2021-03-11 19:57:42 1221 1

原创 HDU -4022 Bombing

传送门问题描述:It’s a cruel war which killed millions of people and ruined series of cities. In order to stop it, let’s bomb the opponent’s base.It seems not to be a hard work in circumstances of street battles, however, you’ll be encountered a much more diff

2021-03-10 18:12:26 106

原创 HDU-2778 LCR

传送门问题描述:LCR is a simple game for three or more players. Each player starts with three chips and the object is to be the last person to have any chips. Starting with Player 1, each person rolls a set of three dice. Each die has six faces, one face with a

2021-03-10 17:52:04 220

原创 HDU - 4287 Intelligent IME

传送门问题描述:We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific, the number buttons may correspond to some English letters respectively, as shown below:  2 : a, b, c 3 : d, e,

2021-03-10 17:50:20 104

原创 HDU - 1075 What Are You Talking About

传送门问题描述:Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want to translate the history book into English. C

2021-03-10 17:37:40 233

原创 HDU - 4452 Running Rabbits

传送门问题描述:Rabbit Tom and rabbit Jerry are running in a field. The field is an N×N grid. Tom starts from the up-left cell and Jerry starts from the down-right cell. The coordinate of the up-left cell is (1,1) and the coordinate of the down-right cell is (N

2021-03-10 15:17:25 129

原创 HDU - 3789 奥运排序问题

传送门问题描述:按要求,给国家进行排名。输入说明:有多组数据。第一行给出国家数N,要求排名的国家数M,国家号从0到N-1。第二行开始的N行给定国家或地区的奥运金牌数,奖牌数,人口数(百万)。接下来一行给出M个国家号。输出说明:排序有4种方式: 金牌总数 奖牌总数 金牌人口比例 奖牌人口比例对每个国家给出最佳排名排名方式 和 最终排名格式为: 排名:排名方式如果有相同的最终排名,则输出排名方式最小的那种排名,对于排名方式,金牌总数 < 奖牌总数 < 金牌人口比例 &l

2021-03-10 14:50:12 81

原创 HDU - 1263 水果

HDU - 1263 水果传送门问题描述:夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.输入说明:第一行正整数N(0<N<=10)表示有N组测试数据.每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交易,由水果名称(小写字母组成,长度不超过80),水果产地(

2021-03-10 14:36:56 211 1

原创 HDU - 6077 Time To Get Up

HDU - 6077 Time To Get Up问题描述:Little Q's clock is alarming! It's time to get up now! However, after reading the time on the clock, Little Q lies down and starts sleeping again. Well, he has alarms, and it's just the first one, he can continue sleeping

2021-03-06 16:31:04 95

原创 HDU - 1982 Kaitou Kid - The Phantom Thief

HDU - 1982 Kaitou Kid - The Phantom Thief传送门问题描述:Do you know Kaitou Kid? In the legend, Kaitou Kid is a master of disguise, and can take on the voice and form of anyone. He is not an evil person, but he is on the wrong side of the law. He’s the very e

2021-03-06 16:21:58 121

原创 HDU - 1088 Write a simple HTML Browser

HDU - 1088 Write a simple HTML Browser传送门问题描述:If you ever tried toread a html document on a Macintosh, you know how hard it is if no Netscape is installed.Now, who can forget to install a HTML browser? This is very easy because most of the times you d

2021-03-06 16:10:23 108

原创 HDU - 1073 Online Judge

HDU-1073 Online Judge问题描述:Ignatius is building an Online Judge, now he has worked out all the problems except the Judge System. The system has to read data from correct output file and user’s result file, then the system compare the two files. If the tw

2021-03-06 15:59:55 228

原创 HDU - 3527 SPY

HDU - 3527 SPY问题描述:The National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’s confidential paper. So the commander of The National Intelligence Council take measures immediat

2021-03-06 10:03:07 602

原创 HDU-1039 Easier Done Than Said?

HDU-1039 Easier Done Than Said?问题描述:Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtpzyo), but

2021-03-06 09:42:51 99

原创 HDU-1020 Encoding

HDU-1020 Encoding问题描述:Given a string containing only ‘A’ - ‘Z’, we could encode it using the following method:Each sub-string containing k same characters should be encoded to “kX” where “X” is the only character in this sub-string.If the length o

2021-03-06 09:23:47 217

原创 HDU-4841 圆桌问题

圆桌问题 HDU - 4841问题描述:圆桌上围坐着2n个人。其中n个人是好人,另外n个人是坏人。如果从第一个人开始数数,数到第m个人,则立即处死该人;然后从被处死的人之后开始数数,再将数到的第m个人处死……依此方法不断处死围坐在圆桌上的人。试问预先应如何安排这些好人与坏人的座位,能使得在处死n个人之后,圆桌上围坐的剩余的n个人全是好人。输入说明:多组数据,每组数据输入:好人和坏人的人数n(<=32767)、步长m(<=32767);输出说明:对于每一组数据,输出2n个大写字母

2021-03-06 09:15:32 286

原创 3 顺序表ADT模板简单应用算法设计:线性表的合并

3 顺序表ADT模板简单应用算法设计:线性表的合并问题描述:目的:使用自行设计的顺序表ADT或STL中的vector模板,设计并实现顺序表应用场合的一些简单算法设计。应用4:试设计一个算法,将所有在线性表LB中但不在LA中的数据元素插入到LA中,算法执行之后,线性表LB不再存在。参考函数原型:(2)顺序表ADT版本templatevoid Union_Sq( SqList &LA, SqList &LB );(2)vector版本templatevoid Union_S

2021-03-04 18:49:34 767 1

原创 2 顺序表ADT模板简单应用算法设计:删除顺序表中的冗余元素

2 顺序表ADT模板简单应用算法设计:删除顺序表中的冗余元素问题描述:目的:使用自行设计的顺序表ADT或STL中的vector模板,设计并实现顺序表应用场合的一些简单算法设计。应用3:试设计一个算法,删除非空顺序表L中的冗余元素,即使得操作之后的顺序表中只保留操作之前表中所有值都不相同的元素(提纯)。参考函数原型:(1)顺序表ADT版本templatevoid Purge_Sq( Sqlist &L );(2)vector版本templatevoid Purge_Sq( vec

2021-03-04 18:11:07 638 3

原创 1.顺序表ADT模板设计及简单应用:将顺序表中前 m 个元素和后 n 个元素进行互换

1.顺序表ADT模板设计及简单应用:将顺序表中前 m 个元素和后 n 个元素进行互换问题描述:目的:使用自行设计的顺序表ADT或STL中的vector模板,设计并实现顺序表应用场合的一些简单算法设计。应用1:试设计一个算法,用尽可能少的辅助空间将非空顺序表中前 m 个元素和后 n 个元素进行互换,即将线性表(a1,a2,…,am,b1,b2,…,bn) 改变成(b1,b2,…,bn,a1,a2,…,am)。假定m始终是有效值。参考函数原型:(1)顺序表ADT版本templatevoid Ex

2021-03-04 17:39:26 2846 1

空空如也

空空如也

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

TA关注的人

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