摘要:
和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)