摘要:
本人新学(自行脑补)可持久化$\text{01trie}$,敲个板子。 毫无思维但真心难调。 #include<bits/stdc++.h> using namespace std; const int maxn=1e5+10; inline int read(){ int x=0,f=1;char 阅读全文
摘要:
这题真的很裸吧,就是一个更为简单的$\text$二分然后斜率优化。 题目里的式子稍加推导发现就是$(sum+1)^2$,斜率优化即可。 注意这里斜率比较不能用乘法,因为会爆$\text$,然后二分的边界要开大一点。 #include<bits/stdc++.h> using namespace st 阅读全文
摘要:
#2281. 「POI2012」字母 Letters 对应过来做一遍逆序对就好了。 #include<bits/stdc++.h> using namespace std; #define inf 1e9 const int maxn=1e6+10; const int mod=1e9+7; con 阅读全文