摘要:
"codeforces 834 D. The Bakery" (dp + 线段树优化) 题意: 给一个长度为n的序列分成k段,每段的值为这一段不同数字的个数,最大化划分k端的值 $n define LL long long define P pair define ls(i) seg[i].lc d 阅读全文
摘要:
"2017 多校5 Rikka with String" (ac自动机+dp) 题意: Yuta has $n$ $01$ strings $s_i$, and he wants to know the number of $01$ antisymmetric strings of length $ 阅读全文
摘要:
"2017 多校4 Wavel Sequence" 题意: Formally, he defines a sequence $a_1,a_2,...,a_n$ as ''wavel'' if and only if $a_1a_3a_5 a[i]$ 暴力枚举是O(n^4)的,可以用二维树状数组去优化 阅读全文
摘要:
"lazy running" (最短路) 题意: 一个环上有四个点,从点2出发回到起点,走过的距离不小于K的最短距离是多少 $K define LL long long define P pair using namespace std; const LL inf = 1e18; const int 阅读全文
摘要:
"多校4 Dirt Ratio" (二分+线段树) 题意: 给出n个数,找一段区间使得区间内不同数字个数除以区间长度最小,求这个最小值,$n define LL long long define lson l,m,rt'9') c = getchar(); while(c = '0' && c ep 阅读全文