摘要:
可持久化字典树 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #define For(i, j, n) for(int i = j ; i <= n ; + 阅读全文
posted @ 2024-03-11 21:25
Gold_stein
阅读(11)
评论(0)
推荐(0)
摘要:
这道题出得很妙。 首先,对原数组求前缀和,然后我们能够发现,对ai进行操作就相当于交换(s[i],s[i-1]),然后就把原问题转化成维护一个先下凸,后上凸的双峰函数。 #include <iostream> #include <stdio.h> #include <algorithm> #incl 阅读全文
posted @ 2024-03-11 10:46
Gold_stein
阅读(23)
评论(0)
推荐(0)

浙公网安备 33010602011771号