![](https://img-blog.csdnimg.cn/20190902220717520.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
贪心
心悦灵溪
这个作者很懒,什么都没留下…
展开
-
HDU 5573 Binary Tree 【二进制+思维】
传送门:HDU 5573Binary TreeProblem DescriptionThe Old Frog King lives on the root of an infinite tree. According to the law, each node should connect to exactly two nodes on the next level, forming...原创 2020-03-19 15:43:08 · 145 阅读 · 0 评论 -
HDU 5583 Kingdom of Black and White 【贪心】
传送门:HDU 5583Kingdom of Black and WhiteProblem DescriptionIn the Kingdom of Black and White (KBW), there are two kinds of frogs: black frog and white frog.Now N frogs are standing in a line, so...原创 2020-03-19 15:13:42 · 144 阅读 · 0 评论 -
Codeforces 1321C Remove Adjacent 【贪心】
Codeforces 1321CRemove AdjacentYou are given a string s consisting of lowercase Latin letters. Let the length of s be |s|. You may perform several operations on this string.In one operation, yo...原创 2020-03-02 22:16:57 · 301 阅读 · 0 评论 -
Codeforces 1257D Yet Another Monster Killing Problem【贪心】
传送门:Codeforces 1257DD.Yet Another Monster Killing Problemtime limit per test: 2 secondsYou play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with...原创 2019-11-15 21:51:24 · 682 阅读 · 0 评论 -
洛谷P2989 Need For Speed 【贪心】
传送门:洛谷 P2989牛客题目链接 Need For Speed题目描述:Bessie is preparing her race car for the upcoming Grand Prix, but she wants to buy some extra parts to improve the car’s performance. Her race car current...原创 2019-10-28 20:25:49 · 161 阅读 · 0 评论 -
Codeforces 1249D2 Too Many Segments (hard version) 【贪心】
传送门:Codeforces 1249D2Too Many Segments (hard version)time limit per test: 2 secondsmemory limit per test: 256 megabytesYou are given n segments on the coordinate axis OX. Segments can intersec...原创 2019-10-25 21:23:42 · 649 阅读 · 1 评论 -
HDU 6047 Maximum Sequence 【贪心】
传送门:HDU 6047Maximum SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2995 Accepted Submission(s): 1378Problem DescriptionStep...原创 2019-07-12 15:59:59 · 108 阅读 · 0 评论 -
Codeforces 1197C 贪心+思维好题
传送门:Codeforces 1197CArray Splittingtime limit per test:2 secondsmemory limit per test:256 megabytesinputstandard inputoutputstandard outputProblem DescriptionYou are given a sorted array a1...原创 2019-07-23 22:03:14 · 293 阅读 · 0 评论 -
混战世界 百度秋招笔试【贪心】
混战世界【题目描述】战乱年代,整个世界各个军阀的兵团混战,你是PZ军团的战略参谋,你手下有n(保证为3的倍数)个士兵,第 i 个士兵的物理攻击数值为 Ai ,魔法攻击数值为 Bi ,你需要将这些士兵三等分为三个连,第一个连需要去物理空间参加物理对抗战争,战斗力估值 W1 为士兵的物理攻击数值之和;第二个连需要去魔法空间参见魔法战争,战斗力估值 W2 为士兵的魔法攻击数值之和;第三个连需要去虚幻...原创 2019-07-25 17:31:33 · 167 阅读 · 0 评论 -
HDU 6586 String 2019HDU多校赛第一场1009【贪心】
传送门:HDU 6586StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionTom has a string containing only lowercase letters. He wants to choose...原创 2019-07-30 21:06:09 · 431 阅读 · 1 评论 -
HDU 6438 Buy and Resell 【贪心+思维+优先队列】
传送门:HDU 6438Buy and ResellTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionThe Power Cube is used as a stash of Exotic Power. There are n c...原创 2019-08-20 14:09:39 · 200 阅读 · 0 评论 -
洛谷 P1281 书的复制 【区间dp+贪心】
传送门:P1281题目背景大多数人的错误原因:尽可能让前面的人少抄写,如果前几个人可以不写则不写,对应的人输出0 0。不过,已经修改数据,保证每个人都有活可干。题目描述现在要把m本有顺序的书分给k给人复制(抄写),每一个人的抄写速度都一样,一本书不允许给两个(或以上)的人抄写,分给每一个人的书,必须是连续的,比如不能把第一、第三、第四本书给同一个人抄写。现在请你设计一种方案,使...原创 2019-08-22 11:54:14 · 317 阅读 · 0 评论 -
HDU 6301 Distinct Values【贪心】
传送门:HDU 6301Distinct ValuesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionChiaki has an array of n positive integers. You are told some fa...原创 2019-07-12 11:42:49 · 123 阅读 · 0 评论 -
HDU 6299 Balanced Sequence 【贪心】
传送门:HDU 6299Balanced SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionChiaki has n strings s1,s2,…,sn consisting of ‘(’ and ‘)’. A...原创 2019-07-11 20:59:11 · 123 阅读 · 0 评论 -
HDU 1050 移桌子(贪心)
传送门:HDU 1050Moving TablesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 46145 Accepted Submission(s): 14995Problem DescriptionThe famous...原创 2019-07-08 19:46:04 · 248 阅读 · 0 评论 -
POJ 1700 Crossing River【经典贪心】
传送门:POJ 1700Crossing RiverTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22561 Accepted: 8285DescriptionA group of N people wishes to go across a river with only one boat, which can ...原创 2019-07-08 22:07:11 · 119 阅读 · 0 评论 -
POJ 1328 【贪心】
传送门:POJ 1328Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 122119 Accepted: 26990DescriptionAssume the coasting is an infinite straight line. Land is in one side o...原创 2019-07-09 11:31:21 · 299 阅读 · 0 评论 -
POJ 3253 Fence Repair【贪心】
传送门:POJ 3253Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 70430 Accepted: 23193DescriptionFarmer John wants to repair a small length of the fence around the pasture. ...原创 2019-07-09 15:14:05 · 136 阅读 · 0 评论 -
HDU 3183 A Magic Lamp 【贪心】
传送门:HDU 3183A Magic LampTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionKiki likes traveling. One day she finds a magic lamp, unfortunately...原创 2019-07-13 16:16:22 · 132 阅读 · 0 评论 -
HDU 4296 Buildings 【贪心】
传送门:HDU 4296BuildingsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionHave you ever heard the story of Blue.Mary, the great civil engineer...原创 2019-07-13 22:16:02 · 112 阅读 · 0 评论 -
HDU 1055 Color a Tree 【贪心】
传送门:HDU 1055Color a TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3183 Accepted Submission(s): 1158Problem DescriptionBob is ver...原创 2019-07-10 12:00:52 · 390 阅读 · 0 评论 -
HDU 5073 Galaxy 【贪心】
传送门:HDU 5073GalaxyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionGood news for us: to release the financial pressure, the government st...原创 2019-07-14 16:03:41 · 197 阅读 · 0 评论 -
HDU 1052 田忌赛马
传送门:HDU 1052Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40911 Accepted Submission(s): 12302Problem Des...原创 2019-07-10 15:06:55 · 144 阅读 · 0 评论 -
HDU 5920 Ugly Problem 贪心+模拟(大数)
传送门:HDU 5920原创 2019-07-14 19:56:33 · 169 阅读 · 0 评论 -
HDU 4550 卡片游戏 【贪心】
传送门:HDU 4550卡片游戏Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Problem Description 小明最近宅在家里无聊,于是他发明了一种有趣的游戏,游戏道具是N张叠在一起的卡片,每张卡片上都有一个数字,数字的范围是0~9,游戏规则如下:首先...原创 2019-07-10 21:50:53 · 346 阅读 · 2 评论 -
HDU 6002 Game Leader 【贪心】
传送门:HDU 6002Game LeaderTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionRecently Tom is playing an interesting game. The game contains a...原创 2019-07-11 16:41:10 · 230 阅读 · 0 评论 -
活动安排问题(贪心) 51nod 1428
传送门:51nod 1428有若干个活动,第i个开始时间和结束时间是[Si,fi),同一个教室安排的活动之间不能交叠,求要安排所有活动,最少需要几个教室?输入第一行一个正整数n (n <= 10000)代表活动的个数。第二行到第(n + 1)行包含n个开始时间和结束时间。开始时间严格小于结束时间,并且时间都是非负整数,小于1000000000输出一行包含一个整数表示最少教...原创 2019-07-08 16:57:05 · 332 阅读 · 0 评论