算竞笔记 - 题集/板子整理(C++)
Preface 参考主要来自《算法竞赛入门经典:训练指南》、OIWiki、CP Algorithms等资源和多方博客、课程,在自己的码风下所著 注: 部分实现可能用到较新语言特性,烦请修改后在较老OJ上使用;原则上提供的代码兼容符合Cpp20及以上标准的编译器 Header #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef double lf; typedef pair<ll, ll> II; typedef vector<ll> vec; const inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(0u); cout.tie(0u); } const lf PI = acos(-1); const lf EPS = 1e-8; const ll INF = 1e18; const ll MOD = 1e9 + 7; const ll DIM = 1e5; int main() { fast_io(); /* El Psy Kongroo */ return 0; } 数学 快速幂 // 注:爆int64考虑__int128或相关intrinsic // MSVC: https://codeforces....