会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
towboat
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
31
32
33
34
35
36
37
38
39
···
54
下一页
2023年1月7日
n^2 判断回文串
摘要: int test(int a,int b){ if(a>=b) return 1; if(s[a]!=s[b]) return 0; if(vis[a][b]) return pal[a][b]; vis[a][b]=1; return pal[a][b]=test(a+1,b-1); }
阅读全文
posted @ 2023-01-07 21:36 towboat
阅读(32)
评论(0)
推荐(0)
2023年1月4日
欧拉函数
摘要: 对正整数 n,欧拉函数是小于等于 n 的数中与 n 互质的数的个数 性质摘要 1. a,b互质, f(a*b) =f(a)*f(b) 2. f(x^a) = (x-1)* f(x^(a-1)) 3. if i%j==0 f(i*j)= f(i) *j 4. if i%j !=0 f(i*j)=f(i
阅读全文
posted @ 2023-01-04 11:14 towboat
阅读(26)
评论(0)
推荐(0)
2022年12月24日
乘法逆元
摘要: a*b Ξ 1 (mod p) ,则a, b 互为逆元(mod p) 求逆元 1.费马小定理 : p 是一质数, GCD(a,p)==1 , 则 a^(p-1) Ξ 1 (mod p) 由此 a^(p-2) *a Ξ 1 (mod p) , 那么 a^(p-2) 就是a的逆元 2.exgcd #de
阅读全文
posted @ 2022-12-24 12:47 towboat
阅读(19)
评论(0)
推荐(0)
2022年12月23日
状压dp 记录
摘要: https://www.luogu.com.cn/problem/P1896 http://ybt.ssoier.cn:8088/problem_show.php?pid=1593 https://vjudge.net/problem/HDU-3091 https://zoj.pintia.cn/p
阅读全文
posted @ 2022-12-23 16:12 towboat
阅读(14)
评论(0)
推荐(0)
树上dp 记录
摘要: http://ybt.ssoier.cn:8088/problem_show.php?pid=1575 http://ybt.ssoier.cn:8088/problem_show.php?pid=1576 http://ybt.ssoier.cn:8088/problem_show.php?pid
阅读全文
posted @ 2022-12-23 00:19 towboat
阅读(13)
评论(0)
推荐(0)
2022年12月22日
区间dp 记录
摘要: http://ybt.ssoier.cn:8088/problem_show.php?pid=1569 http://ybt.ssoier.cn:8088/problem_show.php?pid=1570 http://ybt.ssoier.cn:8088/problem_show.php?pid
阅读全文
posted @ 2022-12-22 19:18 towboat
阅读(13)
评论(0)
推荐(0)
字符串 记录2
摘要: http://ybt.ssoier.cn:8088/problem_show.php?pid=1471 字典树板子 http://ybt.ssoier.cn:8088/problem_show.php?pid=1472 "异或",都每个数,在树上每次贪心地走相反地路径 https://loj.ac/
阅读全文
posted @ 2022-12-22 11:04 towboat
阅读(16)
评论(0)
推荐(0)
2022年12月21日
线筛与分解质因数
摘要: 求出最小质因数,然后做除法 #include <bits/stdc++.h> using namespace std ; const int N=5e3+1; int vis[N],c[N],tot; int g[N]; void init(int top){ vis[1]=1; int i,j;
阅读全文
posted @ 2022-12-21 17:44 towboat
阅读(19)
评论(0)
推荐(0)
杂题 记录
摘要: //
阅读全文
posted @ 2022-12-21 11:17 towboat
阅读(45)
评论(0)
推荐(0)
图论 记录
摘要: //
阅读全文
posted @ 2022-12-21 11:17 towboat
阅读(14)
评论(0)
推荐(0)
上一页
1
···
31
32
33
34
35
36
37
38
39
···
54
下一页
公告