上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 这道题直接暴力过的,但是需要注意的是找出的每一组的字母中不能有重复的,如果那样会导致重复子串。 #include<iostream> #include<string> #include<string> #include<string.h> #include<stdio.h> #include<que 阅读全文
posted @ 2016-03-11 19:08 咸咸的告别 阅读(299) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string> #include<string.h> #include<stdio.h> #include<queue> #include<math.h> #include<vector> #include<s 阅读全文
posted @ 2016-03-10 18:24 咸咸的告别 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 这道题目细节琐碎,稍不注意就会WA ,特别是大数的范围,一开始没有把n声明为long long 导致最大的那个数 2147483647 结果为0 还有一开始用了 pow() 这个函数,也应该用double去接受结果。 #include<iostream> #include<string> #incl 阅读全文
posted @ 2016-03-10 10:21 咸咸的告别 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 一看四个整数的范围,<=10000 所以我们肯定不能直接打表求阶乘 利用唯一分解定理(任何一个大于1的正整数都能够被唯一地分解成质因子乘积) #include<iostream> #include<string> #include<string> #include<string.h> #includ 阅读全文
posted @ 2016-03-09 20:33 咸咸的告别 阅读(328) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> #include<string> #include<string.h> #include<stdio.h> #include<queue> #include<math.h> #include<vector> #include<s 阅读全文
posted @ 2016-03-09 18:52 咸咸的告别 阅读(450) 评论(0) 推荐(0) 编辑
摘要: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2629&mosmsg=Submission+received+with+ID+1697 阅读全文
posted @ 2016-03-09 15:00 咸咸的告别 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 输入正整数 a,n,m 输出 a^n %m 的值 #include<iostream> #include<string> #include<string> #include<string.h> #include<stdio.h> #include<stdlib.h> using namespace 阅读全文
posted @ 2016-03-08 17:37 咸咸的告别 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 输入正整数n,m n<=pow(10,100),m<=pow(10,9) 输出 n%m 想想我们在算除法时的过程,我们可以模拟那个过程. #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include 阅读全文
posted @ 2016-03-08 17:18 咸咸的告别 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4527 这道题一开始做得时候没有思考周全,考虑了要爆炸的水滴的时间,但是没有考虑那些还没有爆炸的水珠应该在什么时候加1,这道题一定要以时刻来衡量。 当前的水珠爆炸,它的4个小水珠飞到相邻格子里是下一秒的 阅读全文
posted @ 2016-03-07 16:52 咸咸的告别 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 注意按字典序的时候比较所有字母。 #include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<math.h> #include<queue> #include<algorithm> using n 阅读全文
posted @ 2016-03-04 15:10 咸咸的告别 阅读(158) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页