传送门 比 P1439 排列LCS问题,难那么一点点,只不过有的元素不是两个串都有,还有数据范围变大,树状数组得打离散化. 不过如果用栈+二分的话还是一样的. ——代码 #include <cstdio> #include <algorithm> ; int n, m, size, ans; ], q[MAXN << ], p[MAXN << ]; inline int max(int x, int y) { return x > y ? x : y;…
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 50517 Accepted: 18534 Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swappin…
HDU 5862 Counting Intersections(离散化+树状数组) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=5862 Description Given some segments which are paralleled to the coordinate axis. You need to count the number of their intersection. The input data guarant…