http://poj.org/problem?id=3670 DP,最长不降子序列,O(n*logn)解法 #include <stdio.h> #define N 30030 int n, a[N], dp[N]; const <<)-; int bs(int l ,int r, int x) { int m; while(l < r) { m = (l + r)>>; if(dp[m] <= x) { l = m + ; } else { r = m;…
Holedox Eating Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3362 Accepted Submission(s): 1145 Problem Description Holedox is a small animal which can be considered as one point. It lives i…
求LIS , 然后用 n 减去即为answer ---------------------------------------------------------------------------- #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #define rep( i , n ) for( int i = 0 ; i < n ; ++i…
因为没注意到long long 就 TLE 了... 二分一下答案就Ok了.. ------------------------------------------------------------------------------ #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #define rep( i , n ) for( int i = 0…