摘要:
题意: "传送门" 已知$0 include include include include include include include include include include include include using namespace std; typedef long long 阅读全文
摘要:
题意: 求$x^2 \equiv a \mod p$ 的所有整数解 思路: 二次剩余定理求解。 参考: "二次剩余Cipolla's algorithm学习笔记" 板子: 代码: 阅读全文
摘要:
题意: 石子合并,问最小代价 思路: GarsiaWachs,朴素做法$O(n^2)$复杂度,实际上比这个稍微小点。平衡树优化能到$O(nlogn)$。 代码: 阅读全文