https://www.vijos.org/p/1741P1741观光公交请登录后递交标签:NOIP提高组2011[显示标签]描述风景迷人的小城Y市,拥有n个美丽的景点。由于慕名而来的游客越来越多,Y市特意安 排了一辆观光公交车,为游客提供更便捷的交通服务。观光公交车在第0分钟出现在1号景点,随后依...
分类:
其他好文 时间:
2014-08-08 23:42:56
阅读次数:
405
UVA 1016 - Silly Sort
题目链接
题意:给定一个序列,数字都不同,每次可以交换两个数字,交换的代价为两数之和,要求出把这个序列变成递增最小代价
思路:利用置换的分解原理,可以把序列的每条循环单独考虑,对于每条循环而言,不断交换肯定每个数字至少会换到一次,再利用贪心的思想,如果每次拿循环中的最小值去置换,那么就是这个最小值会用长度-1次,而剩下的数字各一次,注意...
分类:
其他好文 时间:
2014-08-08 21:32:26
阅读次数:
374
Problem Description
bobo found an ancient string. The string contains only three charaters -- "(", ")" and "?".
bobo would like to replace each "?" with "(" or ")" so that the string is valid (d...
分类:
其他好文 时间:
2014-08-08 18:15:06
阅读次数:
273
http://acm.hdu.edu.cn/showproblem.php?pid=4925
尽量让每棵苹果树周围都施肥,每次找到一个空地种上苹果树之后,使其周围的空地施肥,不再种苹果树。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#in...
分类:
移动开发 时间:
2014-08-08 16:17:46
阅读次数:
260
先对开始时间进行排序,在利用优先队列是结束时间早点先出队;
因为时间只有20000,我们可以去枚举每个单位时间,看要给分配给那个任务,
如果某个时间队列中还有结束时间大于枚举的时间,就跳出判断是在mid的右边。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
...
分类:
其他好文 时间:
2014-08-08 12:59:45
阅读次数:
265
先从中找出性能最好的那个数,
在用钱比较少的去组合,能组出来就表明答案在mid的右边,反之在左边,
#include
#include
#include
#include
#include
using namespace std;
map vic;//以字符映射数字
int end,start;
int num;
int m,n;
int sba,sbb;
char na...
分类:
其他好文 时间:
2014-08-08 12:59:35
阅读次数:
266
Description
Background
Jim is a brave explorer. One day, he set out for his next destination, a mysterious hill. When he arrived at the foot of the hill, he was told that there were a bunch of mons...
分类:
其他好文 时间:
2014-08-08 12:52:35
阅读次数:
314
题目链接:
啊哈哈,点我点我
题目意思:
给出n个怪物可以拿到卡片的范围和这个怪物对主人公造成的伤害。。然后求最后得到怪物对主人公的最小伤害。。
思路:对怪物造成的伤害从大到小排序,然后对n个怪物进行逐一枚举,枚举时对它的时间进行逆向枚举,然后没有被访问到的将其伤害降为0,最后统计一下即可。
题目:
A Bunch Of Monsters
Time Lim...
分类:
其他好文 时间:
2014-08-08 02:06:45
阅读次数:
277
Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6499Accepted Submission(s): 38...
分类:
其他好文 时间:
2014-08-08 01:56:45
阅读次数:
296