摘要:
首先是平衡树,然后是整除分块 //最终版本 #include<iostream> #include<cstdio> #include<cstring> typedef long long ll; using namespace std; ll n,m; struct Splay{ #define N 阅读全文
摘要:
先考虑如何构造一个比序列 \(A\) ,字典序大一的序列 首先考虑在末尾添加一个 \(b\) ,如果超过了添加上限,那么就进一位。把末尾的 \(b\) ,全部拿掉,然后在前面一个可以放置 \(b\) 的地方放一个,比如下面情况 3 2 3 a * a * a a a a b a b a 于是我们可以 阅读全文