
数论
文章平均质量分 69
wei.yinfu
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
东大OJ-麦森数
1064: 麦森数时间限制: 1 Sec 内存限制: 128 MB提交: 52 解决: 9[提交][状态][讨论版]题目描述形如2P-1的素数称为麦森数,这时P一定也是个素数。但反过来不一定,即如果P是个素数,2P-1不一定也是素数。到1998年底,人们已找到了37个麦森数。最大的一个是P=3021377,它有909526位。麦森数有许多重要应用,它与完全数密切相关。原创 2014-07-31 21:48:15 · 1163 阅读 · 0 评论 -
2015年辽宁省赛Interesting Tree
1578: Interesting Tree时间限制: 1 Sec 内存限制: 128 MB提交: 119 解决: 15[提交][状态][讨论版]题目描述Recently, Miss Huang want to receive a Tree as her birthday gift! (What a interesting person!) As a interesting pers原创 2015-06-10 09:17:39 · 498 阅读 · 0 评论 -
vijos P1009清帝之惑之康熙
背景康熙是中国历史乃至世界历史中最伟大的帝王之一,清除螯拜,撤除三藩,统一台湾,平定准葛尔叛乱;与此同时,出众的他也被世界各国遣清使臣所折服。康熙是历史上少有的全人,不仅文武兼得,而且在各各方面都有见地,比如说航海、数学、英语、构图、建筑等等。一个最好的例子可以证明:康熙当年演算代数题的草稿纸至今仍然保存完好。话说康熙掌权之后,每天都抽空做数学题,特别是无聊题。这些天,某某老师开始教他做一原创 2015-03-23 13:24:08 · 1286 阅读 · 0 评论 -
东大OJ-5到100000000之间的回文质数
1217: VIJOS-P1042时间限制: 0 Sec 内存限制: 128 MB提交: 78 解决: 29[提交][状态][讨论版]题目描述 有一天,雄霸传授本人风神腿法第一式:捕风捉影..............的步法(弟子一:堂主,你大喘气呀。风:你给我闭嘴。)捕风捉影的关键是换气(换不好就会大喘气...)。 使用捕风捉影这一招时并不是每原创 2014-08-01 15:39:58 · 1111 阅读 · 0 评论 -
矩阵乘法+快速幂+序列递推公式
1250: Gobonacci时间限制: 1 Sec 内存限制: 128 MB提交: 75 解决: 11[提交][状态][讨论版]题目描述 Fibonacci sequence is well-known to us ,f(0)=1,f(1)=1, f(n) = f(n-1)+f(n-2), how nice the recursion! In additio原创 2014-07-30 21:52:31 · 861 阅读 · 0 评论 -
全排列散列
题目描述 Did you remember that simple problem permutation of five? Now, TY has meeted another problem about permutation. Help him. You are given two numbers, n and m. The permutation is原创 2014-07-30 21:02:17 · 799 阅读 · 0 评论 -
自然数从1到n之间,有多少个数字含有1
问题明确而简单,原创 2014-07-29 13:42:10 · 2465 阅读 · 0 评论 -
东大OJ-1040-Count-快速幂方法求解斐波那契-
Many ACM team name may be very funny,such as "Complier_Error","VVVVV".Oh,wait for a minute here.Is it "W W"+"V",or "W"+"V V V",or something others we can treat as?There are several ways we can treat原创 2014-07-30 10:36:03 · 872 阅读 · 0 评论 -
东大OJ-1391-Big big Power
题目描述Calculate the power num a^(b^c) mod 1e9+7输入Multiple test cases,each case has three integers a,b and c . a,b,c is less than 1e9;输出Output the answer in each line样例输入2原创 2014-07-29 21:34:55 · 905 阅读 · 0 评论 -
3n+1b 备忘录方法
#include#includeint a[100001];int f(int i){ if (i > 100000){ if (i % 2 == 0)return f(i / 2) + 1; else return f((i * 3 + 1) / 2) + 1; } if (i == 1)return 0;原创 2014-07-28 21:12:42 · 828 阅读 · 0 评论 -
东大OJ-1430-PrimeNumbers
题目描述I'll give you a number , please tell me how many different prime factors in this number.输入There is multiple test cases , in each test case there is only one line contains a number N(原创 2014-07-29 16:18:44 · 856 阅读 · 0 评论 -
东大oj-1511: Caoshen like math
Worfzyq likes Permutation problems.Caoshen and Mengjuju are expert at these problems . They have n cards,and all of the numbers vi on these cards are different . Because Caoshen doesn'tlike disorder原创 2015-06-10 22:23:19 · 585 阅读 · 0 评论