上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 54 下一页
  2023年1月7日
摘要: 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日
摘要: 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)
摘要: 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日
摘要: 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)
摘要: 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 下一页