题目大意:有N头牛,每头牛两个权值,A和B。从这N头牛中选取C头牛,使得:
1、这些牛中A权值的中位数尽量大。
2、这些牛的B权值的和小于题中所给的F
输出这个最大的A权值的中位数;如果没有满足题意的解,就输出-1。值。
思路:
堆有一个神奇的功能。假设上图是一个数组,在B从A到C移动的过程中,利用大根堆可以维护出B在所有位置时,从A到B中选K个值...
分类:
其他好文 时间:
2014-09-04 19:14:30
阅读次数:
238
Covered WalkwayTime Limit: 30000/10000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionYour university wants to build a ...
分类:
其他好文 时间:
2014-09-02 21:19:45
阅读次数:
197
( School of Computer Science & Technology, Soochow University,SuZhou 215006;)Abstract:H.264 is the newest video coding standard, and it will be widely...
分类:
其他好文 时间:
2014-08-29 17:57:58
阅读次数:
243
Description
Games Are Important
One of the primary hobbies (and research topics!) among Computing Science students at the University of Alberta is, of course, the playing of...
分类:
其他好文 时间:
2014-08-28 21:17:06
阅读次数:
318
题目:hdoj 4925 Apple tree
来源:2014
Multi-University Training Contest 6
题意:给出一个矩阵,然后每个格子中的数是2^(相邻格子的个数),然后要求不能取相邻的数,让取得数最大。
分析:就是hdoj 1569 点击打开链接 的版本,只不过数据范围增大了。不过数据水了。下来一样的效果,相同的代码可以ac。...
分类:
移动开发 时间:
2014-08-28 13:25:18
阅读次数:
321
(内容可能有点琐碎,只是我总结的一点发展要点)
SUN公司:Stanford University Network(斯坦福大学校园网),1982年成立。
java发展前身:Oak,1991年出现。
Ork:中文意思是橡树,是SUN公司的工程师在C++的基础之上开发的一个新平台。
Ork开发的一套浏览器:HotJava。
Java主设计师:James...
分类:
编程语言 时间:
2014-08-26 19:41:56
阅读次数:
343
题目:hdoj 4888 Redraw Beautiful Drawings
分类:最大流满流 , 最大流唯一性
来源:2014
Multi-University Training Contest 3
题意:一个矩阵的每行每列的和都知道,然后让你求能不能填,是否唯一,唯一的话输出解、
分析:这个题目能看出来是最大流,但是难点有2.
首先:题中矩阵400...
Moses - A beam search decoder for phrase-based statistical machine translation modelsCopyright (C) 2006 University of EdinburghThis library is free so...
分类:
其他好文 时间:
2014-08-25 16:56:34
阅读次数:
392
思路: 枚举
Reduced ID Numbers
Time Limit: 2000MS Memory Limit: 65536K
Total Submissions: 8847 Accepted: 3552
Description
T. Chur teaches various groups of students at university U. Every U-student ...
分类:
其他好文 时间:
2014-08-21 17:24:04
阅读次数:
166
题目 Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University of Wa...
分类:
其他好文 时间:
2014-08-21 15:22:24
阅读次数:
237