| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
参考大牛的思想瞬间秒杀吃饭碰到nill, 问了个关于组合数学的问题。
结果他直接说就是求最长不上升子序列。 还告诉我自己贪心的思路是错的
回来贴上子序列的模板,瞬间秒杀。。。。 囧啊, 囧啊
没a的兄弟们注意
7
9 48 29 2 26 42 9 35 4 25 45 16 26 21
前面有个人给过数据
正确结果是 3
注意关键字排序。
bool comp1(const struct node a, const struct node b)
{
if(a.x == b.x) return a.y < b.y;
else return a.x < b.x;
}
bool comp2(const struct node a,const struct node b)
{
if(a.y == b.y) return a.x < b.x;
else
return a.y< b.y;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator