![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----贪心
文章平均质量分 83
_Occult_
物語が始まった
展开
-
HDU 4726 Kia's Calculation
Doctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number when the sum of two digits exceeds 9. For example, when she calculates 4原创 2017-04-04 21:09:09 · 433 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1038 Recover the Smallest Number (30)
1038. Recover the Smallest Number (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a collection of number s原创 2016-03-11 14:53:46 · 367 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1037 Magic Coupon (25)
1037. Magic Coupon (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe magic shop in Mars is offering some magic原创 2016-03-11 14:33:36 · 340 阅读 · 0 评论 -
FZU 2111 Min Number
DescriptionNow you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9'). You are allowed to choose 2 integers i and j, such that: i!=j, 1≤i<j≤|n|, here |原创 2016-03-10 18:40:58 · 344 阅读 · 0 评论 -
CodeForces 16B Burglar and Matches
DescriptionA burglar got into a matches warehouse and wants to steal as many matches as possible. In the warehouse there are m containers, in thei-th container there are ai matchboxes, and each原创 2016-04-03 14:58:12 · 497 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1033 To Fill or Not to Fill (25)
1033. To Fill or Not to Fill (25)时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者ZHANG, GuochuanWith highways available, drivi原创 2016-03-09 17:05:19 · 700 阅读 · 0 评论 -
HUST 1353 Dartboard
DescriptionA dartboard is a disc divided into n segments, with each segment labeled with a distinct positive integer between 1 and n. That integer indicates the score for hitting the segment. To m原创 2016-02-18 12:12:02 · 392 阅读 · 0 评论 -
HDU 5360 Hiking
Problem DescriptionThere are n soda conveniently labeled by 1,2,…,n. beta, their best friends, wants to invite some soda to go hiking. The i-th soda will go hiking if the total number of sod原创 2015-08-06 18:43:17 · 767 阅读 · 0 评论 -
HDU 5353 Average
Problem DescriptionThere are n soda sitting around a round table. soda are numbered from 1 to n and i-th soda is adjacent to (i+1)-th soda, 1-st soda is adjacent to n-th soda.Each so原创 2015-08-06 18:41:14 · 881 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1046 Shortest Distance (20)
1046. Shortest Distance (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe task is really simple: given N exits原创 2016-03-11 17:35:20 · 350 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1070 Mooncake (25)
1070. Mooncake (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueMooncake is a Chinese bakery product traditionall原创 2016-03-22 21:17:00 · 374 阅读 · 0 评论 -
FZU 2141 Sub-Bipartite Graph
DescriptionGiven a simple undirected graph G with n vertices and m edges, your task is to select a sub-bipartite graph of G with at least m/2 edges.In the mathematical field of graph theory, a原创 2016-04-14 21:35:44 · 730 阅读 · 0 评论 -
HDU 4723 How Long Do You Have to Draw
There are two horizontal lines on the XoY plane. One is y 1 = a, the other is y 2 = b(a 1, there are N points from left to right, the x-coordinate of which are x = c 1, c 2, ... , c N (c 1 2 N) resp原创 2017-04-04 21:04:35 · 383 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1125 Chain the Ropes (25)
1125. Chain the Ropes (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven some segments of rope, you are suppo原创 2017-03-04 19:19:12 · 356 阅读 · 0 评论 -
HDU 4882 ZCC Loves Codefires
Though ZCC has many Fans, ZCC himself is a crazy Fan of a coder, called "Memset137". It was on Codefires(CF), an online competitive programming site, that ZCC knew Memset137, and immediately became原创 2017-03-02 14:00:25 · 288 阅读 · 0 评论 -
CodeForces 140C New Year Snowmen
As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman should consist of three snowballs: a big one, a medium one and a small one. Sergey's tw原创 2017-03-02 12:26:05 · 386 阅读 · 0 评论 -
HDU 6018 Game Arrangement
Problem DescriptionLuras is fond of playing games. Once she gets free, she might try playing games such as dato and cf.However, if you have read the past problems, you will know that luras is原创 2017-03-02 12:24:03 · 463 阅读 · 0 评论 -
HDU 1725 Find minimal sum
每一个正整数都可以表示成m = An-1(n-1)! + An-2(n-2)! + An-3(n-3)! + ... + A1, (0你能帮帮他吗? Input输入首先给出一个N, 代表有N个测试实例。 接下来的N行, 每行包括一个正整数M (1 Output对于每个测试实例输出min(An-1 + An-2 + .. + A1). Sample Input原创 2016-12-27 12:29:02 · 351 阅读 · 0 评论 -
HUST 1409 烧水问题
把总质量为1kg的水分装在n个杯子里,每杯水的质量均为(1/n)kg,初始温度均为0℃。现需要把每一杯水都烧开。我们可以对任意一杯水进行加热。把一杯水的温度升高t℃所需的能量为(4200*t/n)J,其中,“J”是能量单位“焦耳”。如果一旦某杯水的温度达到100℃,那么这杯水的温度就不能再继续升高,此时我们认为这杯水已经被烧开。显然地,如果直接把水一杯一杯地烧开,所需的总能量为(4200*100)原创 2016-12-21 14:35:47 · 325 阅读 · 0 评论 -
HDU 5821 ball
Problem DescriptionZZX has a sequence of boxes numbered 1,2,...,n. Each box can contain at most one ball.You are given the initial configuration of the balls. For 1≤i≤n, if the i-th box原创 2016-08-11 20:56:57 · 464 阅读 · 0 评论 -
HDU 5402 Travelling Salesman Problem
Problem DescriptionTeacher Mai is in a maze with n rows and m columns. There is a non-negative number in each cell. Teacher Mai wants to walk from the top left corner (1,1) to the bottom rig原创 2015-08-18 17:13:20 · 850 阅读 · 0 评论 -
HDU 5281 Senior's Gun
Problem DescriptionXuejiejie is a beautiful and charming sharpshooter.She often carries n guns, and every gun has an attack power a[i].One day, Xuejiejie goes outside and comes across m原创 2015-07-18 23:51:15 · 652 阅读 · 0 评论 -
UVA 10382 Watering Grass
Watering GrassInput: standard inputOutput: standard outputTime Limit: 3 secondsn sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is原创 2015-02-18 14:14:44 · 416 阅读 · 0 评论 -
UVA 10718 Bit Mask
Problem ABit MaskTime Limit1 SecondIn bit-wise expression, mask is a common term. You can get a certain bit-pattern using mask. For example, if you want to make f原创 2015-02-18 14:09:52 · 394 阅读 · 0 评论 -
UVA 10720 Graph Construction
Problem CGraph ConstructionTime Limit2 SecondsGraph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are dif原创 2015-02-18 14:18:08 · 435 阅读 · 0 评论 -
UVA 10132 File Fragmentation
http://uva.onlinejudge.org/external/101/10132.pdf简单来说就是有很多一样的被切成两片,现在给你碎片,问原来的样子。按长度排个序,把最短的和最长的拼起来试一试就好了。输入处理要弄好#include #include#include#include#include#include#include#include原创 2015-02-18 13:33:42 · 404 阅读 · 0 评论 -
UVA 10905 Children's Game
4thIIUCInter-University Programming Contest, 2005AChildren’s GameInput: standard inputOutput: standard outputProblemsetter: Md. KamruzzamanThere原创 2015-02-17 21:54:29 · 445 阅读 · 0 评论 -
UVA 10716 Evil Straw Warts Live
Evil Straw Warts LiveA palindrome is a string of symbols that is equal to itself when reversed. Given an input string, not necessarily a palindrome, compute the number of swaps necessary to transf原创 2015-02-18 14:20:50 · 493 阅读 · 0 评论 -
UVA 10020 Minimal coverage
http://uva.onlinejudge.org/external/100/10020.pdf给定n条线段,问最少用几条可以覆盖0到M。按左端排序,每次选最长的(贪心)#include#include #include#include#include#include#includeusing namespace std;const int maxn =原创 2015-02-18 13:55:26 · 405 阅读 · 0 评论 -
ZOJ 2315 New Year Bonus Grant
DescriptionAll programmers of Mocrosoft software company are organized in a strict subordination hierarchy. Every programmer has exactly one chief, except Bill Hates who is also the head of the co原创 2015-03-25 23:25:35 · 448 阅读 · 0 评论 -
UVA 11100 The Trip, 2007
The Trip, 2007A 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原创 2015-02-18 14:23:38 · 439 阅读 · 0 评论 -
UVA 270 Lining Up
How am I ever going to solve this problem?" said the pilot.Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangerous area. Furthermore原创 2015-02-18 13:38:18 · 447 阅读 · 0 评论 -
UVA 10714 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 t原创 2015-02-18 13:59:16 · 375 阅读 · 0 评论 -
FZU 1182 Argus
DescriptionA data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such原创 2015-08-09 15:22:11 · 365 阅读 · 0 评论 -
HDU 5361 In Touch
Problem DescriptionThere are n soda living in a straight line. soda are numbered by 1,2,…,n from left to right. The distance between two adjacent soda is 1 meter. Every soda has a teleporter. Th原创 2015-08-07 17:07:40 · 850 阅读 · 0 评论 -
HDU 5310 Souvenir
Problem DescriptionToday is the 1st anniversary of BestCoder. Soda, the contest manager, wants to buy a souvenir for each contestant. You can buy the souvenir one by one or set by set in the shop.原创 2015-07-26 17:08:32 · 507 阅读 · 0 评论 -
POJ 2062 Card Game Cheater
DescriptionAdam and Eve play a card game using a regular deck of 52 cards. The rules are simple. The players sit on opposite sides of a table, facing each other. Each player gets k cards from th原创 2015-07-26 17:03:08 · 566 阅读 · 0 评论 -
POJ 1017 Packets
DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square原创 2015-07-26 16:54:00 · 265 阅读 · 0 评论 -
ACdream 1073 雷霆战机
Description风风最近迷上了一个打飞机游戏——《雷霆战机》,战机分为白二星、绿三星、蓝四星、紫五星,四种品质。当然,最厉害的是紫色五星的战机啦。战机分为升级和进阶两种。升级:提升战机的等级,但战机品质不变。进阶:可将战机提升一个星级(白二星->绿三星->蓝四星->紫五星)。为了简化问题,规定战机进阶规则如下:白色二星:起始等级Lv1级,满级Lv2原创 2015-05-27 21:39:54 · 512 阅读 · 0 评论 -
HDU 1055 color a tree
Problem DescriptionBob is very interested in the data structure of a tree. A tree is a directed graph in which a special node is singled out, called the "root" of the tree, and there is a unique p原创 2015-02-18 16:31:42 · 458 阅读 · 0 评论