摘要: 板子 处理模数运算的自定义数据类 点击查看代码 const int mod = 1e9+7; long long ext_gcd(long long a, long long b, long long &x, long long &y) { if (b == 0) { x = 1; y = 0; r 阅读全文
posted @ 2025-10-02 12:12 miao-jc 阅读(19) 评论(0) 推荐(0)
摘要: NTT固定模数 点击查看代码 #include <iostream> #include <vector> #include <algorithm> using namespace std; const int MOD = 998244353; const int G = 3; // 原根 // 快速 阅读全文
posted @ 2025-03-17 23:44 miao-jc 阅读(38) 评论(0) 推荐(0)
摘要: constexpr int MAXN = 9999; // MAXN 是一位中最大的数字 constexpr int MAXSIZE = 10024; // MAXSIZE 是位数 constexpr int DLEN = 4; // DLEN 记录压几位 struct Big { int a[MA 阅读全文
posted @ 2025-11-14 20:23 miao-jc 阅读(2) 评论(0) 推荐(0)
摘要: 马拉车只能处理连续回文 #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; // 标准马拉车:只找一个最长回文子串 string findLongestPa 阅读全文
posted @ 2025-11-12 23:05 miao-jc 阅读(3) 评论(0) 推荐(0)
摘要: mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); 这行代码用于创建一个高质量的随机数生成器。让我详细解释每个部分: 完整代码示例 #include <iostream> #include <random> #in 阅读全文
posted @ 2025-11-05 22:11 miao-jc 阅读(14) 评论(0) 推荐(0)
摘要: F12 + (function(){ 'use strict'; $("#comment_form, #header, #leftmenu, #big_banner, #footer, #blog_post_info_block").remove(); $("#content").css('marg 阅读全文
posted @ 2025-10-31 18:02 miao-jc 阅读(2) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define pii pair<int, int> const int mod = 998244353; const int 阅读全文
posted @ 2025-10-31 17:32 miao-jc 阅读(1) 评论(0) 推荐(0)
摘要: 1. 等差数列求和 // 首项a1,末项an,项数n ll arithmetic_sum(ll a1, ll an, ll n) { return n * (a1 + an) / 2; } // 首项a1,公差d,项数n ll arithmetic_sum(ll a1, ll d, ll n) { 阅读全文
posted @ 2025-10-31 17:27 miao-jc 阅读(13) 评论(0) 推荐(0)
摘要: 正确代码 #pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include <bits/stdc++.h> using namespace std; #define en 阅读全文
posted @ 2025-04-15 23:20 miao-jc 阅读(13) 评论(0) 推荐(0)
摘要: K Tokitsukaze and Shawarma 签到题,三种时长去max即可。 点击查看代码 #include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long typedef pair<i 阅读全文
posted @ 2025-02-09 18:49 miao-jc 阅读(17) 评论(0) 推荐(0)