时间限制:0.25s空间限制:4M题意: 有n个人,每个人有两个能力值,只有一个人的两个能力都小于另一个的能力值,这两个人才能共存,求能同时共存的最大人数。Solution: 显然这是一个两个关键字的最长上升序列。 先按照第一种能力值为第一关键字从小到大,第二能力值为第二关键...
分类:
其他好文 时间:
2014-10-10 20:39:24
阅读次数:
276
// Playground - noun: a place where people can play
import UIKit
//2014-09-23 集合类型 Collection Types
//.............................................
//1.数组
/*
1. 数组是类型安全的
*/
//1.1定义一个数组变量
var sho...
分类:
编程语言 时间:
2014-10-10 16:37:34
阅读次数:
301
Just a JokeDescription Here is just a joke, and do not take it too seriously. Guizeyanhua is the president of ACMM, and people call him Presid...
分类:
其他好文 时间:
2014-10-10 00:34:21
阅读次数:
408
安装命令:yum install http://people.centos.org/hughesjr/chromium/6/x86_64/RPMS/chromium-28.0.1500.52-207119.x86_64.rpm删除命令:yum remove chromium.x86_64
分类:
其他好文 时间:
2014-10-08 09:49:34
阅读次数:
247
In order to print Card objects in a way that people can easily read, we need a mapping from the integer codes to the corresponding ranks and suits. A ...
分类:
其他好文 时间:
2014-10-03 16:16:04
阅读次数:
206
题意:有n个人每人有一个力气值Si,美丽值Bi,满足Bi>Bj&&Si>Sj 或者 Bi 2 #include 3 #include 4 #include 5 #include 6 #define N 100005 7 using namespace std; 8 9 struct node{10....
分类:
其他好文 时间:
2014-10-03 11:36:44
阅读次数:
266
题目地址:http://acdream.info/problem?pid=1216
这题一开始用的是线段树,后来发现查询的时候还需要DP处理,挺麻烦。。也就不了了之了。。后来想到,这题其实就是一个二维的最长上升子序列。。
要先排序,先按左边的数为第一关键字进行升序排序,再按右边的数为第二关键字进行降序排序。这样的话,第一关键字相同的的肯定不在一个同一个上升子序列中。然后只对第二关键字进行复杂度...
分类:
其他好文 时间:
2014-10-03 11:26:14
阅读次数:
195
Beautiful People
Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge
The most prestigious sports club in one city has exactly N members. Each of its members is strong and beauti...
分类:
其他好文 时间:
2014-10-02 14:10:43
阅读次数:
180
题目:acdream 1216 Beautiful
People
题意:每个人有两个值,能力值和潜力值,然后要求一个人的这两个值都严格大于第二个人的时候,这两个人才能呆在一块儿,给出许多人的值,求最多有多少个人?
分析:很容易想到是个单调非增模型,如果用O(n*n)的写法的话,会超时!
那么我们就要用二分优化来找。
我们可以先按第一个值 x 从小到大排序,然后按第二个值...
分类:
其他好文 时间:
2014-10-02 10:55:12
阅读次数:
242
G - Beautiful People
Time Limit: 10000/5000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
Special Judge
SubmitStatus
Problem Description
The most prestigious sport...
分类:
其他好文 时间:
2014-10-02 09:47:52
阅读次数:
181