上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页
摘要: POJ3461 #include<bits/stdc++.h> #define ull unsigned long long using namespace std; const int maxn=1e6+10; const int mo=1e9+9; const int p=1331; ull h 阅读全文
posted @ 2026-04-21 11:01 msjing 阅读(16) 评论(0) 推荐(0)
摘要: 拉链法 #include<bits/stdc++.h> using namespace std; const int maxn=1e5+3; int h[maxn],to[maxn],nxt[maxn],tot; int n; void add(int y) { tot++; int x=(y%ma 阅读全文
posted @ 2026-04-21 10:12 msjing 阅读(22) 评论(0) 推荐(0)
摘要: \(upd \> on \> 26.10.5\):修 \(\LaTeX\) \(30\) 分钟差点就 \(A\) 三道了没重构出来 \(solve\) 写题解表示红温 观察题目,发现呈 A->B,所以直接掏出链式前向星建边 搜就完了 贴两份我 \(15\) 写的抽象代码 \(code\>\>AC\) 阅读全文
posted @ 2026-04-18 21:53 msjing 阅读(41) 评论(0) 推荐(0)
摘要: 图依旧偷huge的 #include<bits/stdc++.h> using namespace std; long long a,m,b; long long mo; bool f=0; long long gcd(long long a,long long b) {return b?gcd(b 阅读全文
posted @ 2026-04-17 12:12 msjing 阅读(12) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> #define mo 19260817 using namespace std; const int maxn=6e6+10; int a,b; inline void read(int &x) { char ch=getchar();int f=1; 阅读全文
posted @ 2026-04-16 15:12 msjing 阅读(16) 评论(0) 推荐(0)
摘要: 输出 void putout(__int128 x) { if(x > 9) putout(x/10); putchar(x % 10+'0'); } 阅读全文
posted @ 2026-04-15 15:19 msjing 阅读(14) 评论(0) 推荐(0)
摘要: 不许看 阅读全文
posted @ 2026-04-14 12:09 msjing 阅读(13) 评论(0) 推荐(0)
摘要: 费马小定理 long long ksm(long long x,long long y,long long mo) { long long cnt=1; while(y) { if (y&1) cnt=(cnt*x)%mo; x=(x*x)%mo; y>>=1; } return cnt; } lo 阅读全文
posted @ 2026-04-14 11:59 msjing 阅读(20) 评论(0) 推荐(0)
摘要: \(upd \> on \> 26.10.5\):修 \(\LaTeX\) 前言 部分思路来源:李煜东dalao的《算法竞赛进阶指南》 提示:在poj交会MLEqwq 我真推不出算数基本定理的推论 好书啊 \(solve\) 由算数基本定理得到: \(LZYXT\) 的图 对于爻乘 \(B\) 方, 阅读全文
posted @ 2026-04-12 18:27 msjing 阅读(17) 评论(0) 推荐(0)
摘要: 函数(可求一组解) int x,y; int exgcd(int a,int b,int &x,int &y) { if (b == 0) { x=1; y=0; return a; } int res=exgcd(b,a%b,x,y); int t=x; x=y; y=t-a/b*y; retur 阅读全文
posted @ 2026-04-12 15:31 msjing 阅读(28) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页