摘要:
题面 "洛谷" 和动态逆序对那道题没有什么区别 把一个交换换成两个删除和两个插入 cpp include include include include include using namespace std; const int N = 1e5 + 5; const double eps = 1e 阅读全文
摘要:
题面 "luogu" cdq分治入门 注意删的是值不是位置! cpp include include include include using namespace std; const int N = 1e5 + 5; const int inf = 0x3f3f3f3f; struct Node 阅读全文
摘要:
题面 "洛谷" 你有一个长度为n的序列,定义这个序列中每个区间的价值是 $Cost(i,j)=Min(Ai...Aj)∗Max(Ai...Aj)∗(j−i+1)Cost(i,j)=Min(A_{i}...A_{j}) Max(A_{i}...A_{j}) (j i+1)$ 其中,$i,j$是区间的两 阅读全文