
ST
穷源溯流
路很长,尽管走便是。
-
原创 1545:Balanced Lineup
const int N=5e4+5;const int lgN=15+5; int n,m,t; int i,j,k; int a[N]; int lg[N]; int f[N][lgN]; int g[N][lgN]; void init(){ lg[0]=-1; for(int i=1;i<=n;i++){ lg[i]=lg[i>>1]+1; f[i][0]=a[i...2020-09-21 22:20:2637
0
-
原创 1544:天才的记忆
const int N=2e5+5;const int lgN=18+5; int n,m,t; int i,j,k; int a[N]; int lg[N]; int f[N][lgN]; void init(){ lg[0]=-1; for(int i=1;i<=n;i++){ lg[i]=lg[i>>1]+1; f[i][0]=a[i]; } for(in...2020-09-20 09:39:0368
0
-
原创 1542:最敏捷的机器人
const int N=1e5+5;const int logN=17; int n,m,t; int i,j,k; int a[N]; int log[N]; int dp[N][logN+5][2]; //[0]最大值 [1]最小值void init(){ log[0]=-1; for(int i=1;i<=n;i++){ log[i]=log[i>>1]+1; dp[i][0]...2020-09-17 22:50:4630
0
-
原创 1541:数列区间最大值
const int N=1e6+5;const int logN=20; int n,m,t; int i,j,k; int a[N]; int log[N]; int f[N][logN+5];int main(){ //IOS; while(~sdd(n,m)){ for(i=1;i<=n;i++) sd(a[i]); log[0]=-1; for(i=1;i<=n;i...2020-09-17 15:20:0143
0