题目链接 LIS2 经典的三维偏序问题. 考虑$cdq$分治. 不过这题的顺序应该是 $cdq(l, mid)$ $solve(l, r)$ $cdq(mid+1, r)$ 因为有个$DP$. #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i <= (b); ++i) #define dec(i, a, b) for (int i(a); i >= (b); --…
Another Longest Increasing Subsequence Problem Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=19929 Description Given a sequence of N pairs of integers, find the length of the longest incre…
hdu 5618 Jam's problem again #include <bits/stdc++.h> #define MAXN 100010 using namespace std; int n,k,T,xx; int ans[MAXN],c[MAXN],f[MAXN]; struct Node{ int x,y,z,id; }a[100010],b[100010]; inline int read(){ char ch; bool f=false; int res=0; while (…
Jam's problem again Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 640 Accepted Submission(s): 210 Problem Description Jam like to solve the problem which on the 3D-axis,given N(1≤N≤100000)…