题目: Constructing Roads In JGShining's Kingdom Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24446 Accepted Submission(s): 6968 Problem Description JGShining's kingdom consists of 2n(n is no…
http://acm.hdu.edu.cn/showproblem.php?pid=5773 The All-purpose Zero Problem Description ?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to ch…
解题的思路很巧,为了让每个数之间都留出对应的上升空间,使a[i]=a[i]-i,然后再求LIS 另外二分求LIS是比较快的 #include<bits/stdc++.h> #define maxn 1000005 #define ll long long using namespace std; int len,n,a[maxn],lis[maxn]; int main(){ int t; scanf("%d",&t); ;tt<=t;tt++){ scanf…