上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 63 下一页
摘要: //add,懒标记,给以当前节点为根的子树中的每一个点加上add(不包含根节点) // #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef 阅读全文
posted @ 2020-02-11 06:47 晴屿 阅读(101) 评论(0) 推荐(0)
摘要: 和Disharmony Trees HDU - 3015神似 // max(vi,vj) * |posi - posj| #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; typedef lon 阅读全文
posted @ 2020-02-09 21:54 晴屿 阅读(165) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstring> using namespace std; const int N = 100005; int tr[N]; int lowbit(int x) { return x&(-x); } void add(int x,int a) 阅读全文
posted @ 2020-02-09 21:38 晴屿 阅读(111) 评论(0) 推荐(0)
摘要: #include<cstdio> #include<cstring> #include<algorithm> #define ll long long using namespace std; struct node { ll x,h; } Tr[100005]; int n,tr1[100005] 阅读全文
posted @ 2020-02-09 21:23 晴屿 阅读(127) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; typedef long long ll; const int N=1e5+10; int a[N]; int 阅读全文
posted @ 2020-02-09 19:50 晴屿 阅读(231) 评论(0) 推荐(0)
摘要: //每个数字只会被它后面的比它小的数字影响,且会向右移动相应个数的位置 //比如:6 4 3 5 2 1 。4后面比它小的有 三个,因此它的最右边位置就是当前位置 +3,即5 //如果该数字本身在标准位置左边,那无须考虑,初始位置就是最左端 //如果它在标准位置右边,我们可以知道,它最终肯定要回到标 阅读全文
posted @ 2020-02-09 19:28 晴屿 阅读(152) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; typedef long long ll; const int N=5e5+10; int n; int a[ 阅读全文
posted @ 2020-02-08 23:32 晴屿 阅读(102) 评论(0) 推荐(0)
摘要: #include<cstdio> #include<cstring> using namespace std; typedef long long ll; const ll mod=1e9+7; const int N=1005; ll c[N][N]; char op[5]; int lowbit 阅读全文
posted @ 2020-02-08 22:54 晴屿 阅读(114) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; const int N=32005; int a[N]; int tr[N]; int level[N]; i 阅读全文
posted @ 2020-02-08 22:46 晴屿 阅读(96) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=100010; int a[N]; int tr[N]; int n,m; int l,r; int lowbit(in 阅读全文
posted @ 2020-02-08 22:34 晴屿 阅读(165) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 63 下一页