上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 54 下一页
  2023年4月17日
摘要: define S ,it is sum of all possible permutationsof a given set of digits. For example, if the digits are <1 2 3>, then six possible permutations are<1 阅读全文
posted @ 2023-04-17 21:04 towboat 阅读(18) 评论(0) 推荐(0)
摘要: 求1~2^64 区间里, 有多少合法数X 合法数: X= a^b ,至少存在2个不同的a #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N =65536+3; int 阅读全文
posted @ 2023-04-17 20:24 towboat 阅读(25) 评论(0) 推荐(0)
摘要: 给出n, 求有多少对(a,b) (a<b), 满足 LCM(a,b) =n 暴力求所有因数 #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N =1e4+20; #de 阅读全文
posted @ 2023-04-17 16:35 towboat 阅读(16) 评论(0) 推荐(0)
摘要: 给定 m,n ,求最大的 k 使得 m^k∣n! 分解质因数 #include <iostream> #include <cstring> #include <sstream> using namespace std; const int N =1e4+20; const int inf =1e9 阅读全文
posted @ 2023-04-17 15:45 towboat 阅读(22) 评论(0) 推荐(0)
摘要: 两个数 n,m,求 用 m 个 [0,n] 的整数相加使其和为 n 的方案数。 #include <iostream> #include <cstring> #include <sstream> using namespace std; const int N =102; const int mod 阅读全文
posted @ 2023-04-17 14:57 towboat 阅读(18) 评论(0) 推荐(0)
摘要: lcm(a,b)=c 给a,c ,求最小的b 质因数分解的好题 #include <iostream> #include <cstring> #include <sstream> using namespace std; #define int long long int a,b,c; int cn 阅读全文
posted @ 2023-04-17 02:30 towboat 阅读(13) 评论(0) 推荐(0)
  2023年4月16日
摘要: https://www.luogu.com.cn/problem/UVA1392 给定两个长度为 n 的字符串 A 和 B,满足 A 和 B 都只由大写字母 A、C、G、T 组成。 求一个长度最长的闭区间 [L,R],满足对于 i∈[L,R] , 有不超过 p% 的 i 满足 Ai≠Bi 阅读全文
posted @ 2023-04-16 23:20 towboat 阅读(17) 评论(0) 推荐(0)
摘要: 找最长的,没有相同元素的区间 双指针 #include <iostream> #include <set> using namespace std; const int N=1e6+2; int n,a[N]; void solve(){ int x=1,y=1,ans=0; set<int> st 阅读全文
posted @ 2023-04-16 22:48 towboat 阅读(7) 评论(0) 推荐(0)
摘要: 二分平均值x,每个数减去x , 找区间 S[ r ]- S[l]>=0 ,r-l>=m #include <iostream> #include <vector> #include <algorithm> using namespace std; const int N=1e5+5; #define 阅读全文
posted @ 2023-04-16 17:35 towboat 阅读(12) 评论(0) 推荐(0)
摘要: 一个集合中需要找到 a,b,c,d ,使得 a+b+c=d 枚举a,b ,计算a+b,存在map里 再枚举d,c ,计算d-c 是否 存在 d-c==a+b #include <iostream> #include <map> #include <algorithm> #include <vecto 阅读全文
posted @ 2023-04-16 15:53 towboat 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 54 下一页