贪心
Timeclimber
这个作者很懒,什么都没留下…
展开
-
CodeForces - 92D Queue (贪心)
D. Queue time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n walruses standing in a queue in an air原创 2017-09-13 16:49:16 · 596 阅读 · 0 评论 -
杭电多校 第一场 6299 Balanced Sequence(贪心)
题目链接 题意: 有n个字符串,包括了'('和')',现在把这些字符串按照一定顺序连接,使得匹配的括号对最多。问这个最多的个数。 思路: 贪心策略是尽量把'('多的字符串放在前面,')'多的放在后面。 代码: #include<iostream> #include <cstdio> #include<stack> #include <c...原创 2018-07-25 20:41:44 · 242 阅读 · 0 评论 -
hdu 5014 Number Sequence(贪心)
Number SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3041 Accepted Submission(s): 1210Special JudgeProblem DescriptionThere is a sp...原创 2018-05-08 11:49:32 · 198 阅读 · 0 评论 -
hdu 4296 Buildings(贪心)
BuildingsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5348 Accepted Submission(s): 1910Problem Description Have you ever heard the story ...原创 2018-04-23 21:24:48 · 263 阅读 · 0 评论 -
hdu 4011
Working in BeijingTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1939 Accepted Submission(s): 841Problem DescriptionMr. M is an undergraduat...原创 2018-04-03 21:01:26 · 766 阅读 · 0 评论 -
hdu 6188 Duizi and Shunzi(贪心)
Duizi and Shunzi Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1507 Accepted Submission(s): 627 Problem Description Nike likes pla原创 2018-01-28 19:42:03 · 252 阅读 · 0 评论 -
NEFU 1265 (贪心+优先队列)
最高奖励 Problem:1265 Time Limit:1000ms Memory Limit:65535K Description 有N个任务,每个任务有一个最晚结束时间以及一个对应的奖励。在结束时间之前完成该任务,就可以获得对应的奖励。完成每一个任务所需的时间都是1个单位时间。有时候完成所有任务是不原创 2018-01-16 15:38:17 · 269 阅读 · 0 评论 -
hdu 4803 Poor Warehouse Keeper(贪心)
Poor Warehouse Keeper Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5285 Accepted Submission(s): 1356 Problem Description Jenn原创 2017-11-26 19:41:10 · 354 阅读 · 0 评论 -
zoj 3829 Known Notation (贪心)
Known Notation Time Limit: 2 Seconds Memory Limit: 65536 KB Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also k原创 2017-11-01 21:06:45 · 386 阅读 · 1 评论 -
hdu 4424 Conquer a New Region(并查集+贪心)
Conquer a New Region Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2363 Accepted Submission(s): 848 Problem Description The wh原创 2017-11-07 18:19:41 · 311 阅读 · 0 评论 -
hdu 4442 Physical Examination (贪心)
Physical Examination Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5915 Accepted Submission(s): 1656 Problem Description WAN原创 2017-10-15 17:38:47 · 381 阅读 · 0 评论 -
CodeForces #415(div2) Summer sell-off(贪心)
B. Summer sell-off time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Summer holidays! Someone is going on trip原创 2017-09-18 20:44:32 · 661 阅读 · 0 评论 -
牛客网暑期多校训练赛第四场 G题 Maximum Mode
题目链接 题意: 给了一串数字,定义数字的Mode值是出现次数最多的数字,现在可以恰好删除m个数字,Mode值只允许为一个值,求出最大的Mode值为多少,否则输出-1。 思路: 要让某一个值是Mode,需要把比它出现次数多的和与它次数相同的至少降低到比它出现的次数少1。 基于这个想法,可以先处理出每个值出现的次数并将它按照次数的降序来排序。然后O(N)的跑一次,将每个值作为M...原创 2018-07-28 19:39:21 · 359 阅读 · 0 评论