上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页
摘要: 链接 [https://vjudge.net/contest/212939 problem/D] 题意 让你计算n!的位数有多少个0,生成0的就是2,5,可以把一些数拆成2的乘积或者5的乘积(10=2 5,25=5 5,125=5 5 ) 但有一点很明确就是拆之后2的个数一定是大于5的个数,所以只需 阅读全文
posted @ 2018-10-29 21:19 ChunhaoMo 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 链接 [https://vjudge.net/contest/212939 problem/C] 题意 给你个字典,字典包含若干个单词; 再给你若干个单词,让你输出跟这个单词有相同的字母的字典里的单词(不考虑顺序) 分析 STL set的应用以及next_permutation的应用 用set保存字 阅读全文
posted @ 2018-10-29 21:15 ChunhaoMo 阅读(317) 评论(0) 推荐(1) 编辑
摘要: 这个讲的好 [http://www.cnblogs.com/My Sunshine/p/4985366.html] 阅读全文
posted @ 2018-10-29 21:01 ChunhaoMo 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 链接 [http://acm.hdu.edu.cn/showproblem.php?pid=1098] 分析: 数学归纳法 f(1) = 18 + ka; 假设f(x) = 5 x^13+13 x^5+k a x 能被65整除 f(x+1) = 5 (x+1)^13+13 (x+1)^5+k a ( 阅读全文
posted @ 2018-10-29 16:57 ChunhaoMo 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题意 给你n m的棋盘问有多少个矩形 分析 先看只有一行或一列的情况有1+2+....+n个,因为矩形的类型有1个最小单位格子n个,2个最小单位格子n 1个,n个最小单位格子有一个 code include using namespace std; int main() { int t,m,n,a, 阅读全文
posted @ 2018-10-18 23:49 ChunhaoMo 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题意 算第n项,f(1) = 1, f(2) = 1, f(n) = (A f(n 1) + B f(n 2)) mod 7. 分析 可能的情况0,1,2,3,4,5,6,f(n 1),f(n 2) 所以f(n)最多有49种方案有f(n 1),f(n 2)得来 最大循环节49,n%49即可 code 阅读全文
posted @ 2018-10-18 23:32 ChunhaoMo 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 题意 给你公式seed(x+1) = [seed(x) + STEP] % MOD ,输入step和mod, 问你是否可以从第一项0,算到mod,它们是否都不同 是 good choice 否则 bad choice 分析 枚举过去 code include include include incl 阅读全文
posted @ 2018-10-18 23:27 ChunhaoMo 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题意 给你大写字母的字符串,A=1,...Z=26,以及target 问你是否有v w^2 + x^3 y^4 + z^5 = target 有输出字典序大的那个字符串 分析 dfs code include include include include include using namespa 阅读全文
posted @ 2018-10-18 23:20 ChunhaoMo 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题意 让你统计字符串最多的那个串,并输出 分析 直接用map统计,不断更新最大值即可 代码 include include include include using namespace std; int main(){ string s,ans; int n; //freopen("in.txt" 阅读全文
posted @ 2018-10-17 13:17 ChunhaoMo 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 链接 [http://acm.hdu.edu.cn/showproblem.php?pid=1161] 题意 把字符串中大写字母变为小写 。 分析 主要是含有空格的字符串如何读入,用getline(cin,s); 代码 include include using namespace std; def 阅读全文
posted @ 2018-10-17 12:56 ChunhaoMo 阅读(96) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页