2023年10月8日

摘要: #define mod 998244353 template <typename T> inline void read(T & x) { T f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') { f = -1 阅读全文
posted @ 2023-10-08 17:53 吕浩宁 阅读(0) 评论(0) 推荐(0)
 
摘要: 可变参数快读 template <typename T> inline void read(T & x) { long long f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') { f = -1; } c = 阅读全文
posted @ 2023-10-08 17:46 吕浩宁 阅读(4) 评论(0) 推荐(0)
 
摘要: 快速幂 inline int quick_pow(int a, int b, int ans = 1) { while (b) { if (b & 1) { ans = ans * a % mod; } a = a * a % mod; b >>= 1; } return ans; } 阅读全文
posted @ 2023-10-08 16:26 吕浩宁 阅读(4) 评论(0) 推荐(0)