摘要: 1、判断质数 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 bool is_prime(int n){ 5 if(n < 2) return false; 6 for(int i = 2; i <= n / i; ++i){ 7 if(n 阅读全文
posted @ 2022-04-03 16:13 std&ice 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 模板题链接 1、mod为质数下的普通逆元求法 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int fp(int a, int b, int c){ 5 int res = 1; 6 while(b){ 7 if(b & 1) res = 阅读全文
posted @ 2022-04-03 11:00 std&ice 阅读(52) 评论(0) 推荐(0) 编辑