数学
文章平均质量分 86
默默Silence
这个作者很懒,什么都没留下…
展开
-
(卡特兰数)Train Problem II --HDOJ
Train Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 909 Accepted Submission(s): 542 Problem Description As we all know the Train原创 2017-07-19 16:42:42 · 207 阅读 · 0 评论 -
(斯特林数)Examining the Rooms--HDOJ
Examining the Rooms Problem Description A murder happened in the hotel. As the best detective in the town, you should examine all the N rooms of the hotel immediately. However, all the doors of the ro原创 2017-07-20 08:38:36 · 307 阅读 · 0 评论 -
(卡特兰数变形m+n,找零)Buy the Ticket--HDOJ
Buy the Ticket Problem Description The \\\\”Harry Potter and the Goblet of Fire\\\\” will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first原创 2017-07-20 11:47:18 · 270 阅读 · 0 评论 -
(求大数的前n位数字)Fabonacci -- HDOJ 1568
Fibonacci Problem Description 2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列 (f[0]=0,f[1]=1;f[i] = f[i-1]+f=2”>i-2)的值全部给背了下来。 接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说原创 2017-07-17 15:39:24 · 407 阅读 · 0 评论 -
(数学,小数化分数的规律)小数化分数2-HDOJ
小数化分数2 Problem Description Ray 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢? 请你写一个程序不但可以将普通小数化成最简分数,也可以把循环小数化成最简分数。Input 第一行是一个整数N,表示有多少组数据。 每组数据只有一个纯小数,也就是整数部分为0。小数的位数不超过9位,循原创 2017-07-17 08:25:33 · 535 阅读 · 0 评论 -
(约瑟夫环公式)Joseph - HDOJ
Joseph Problem Description The Joseph\\\\’s problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, …, n, standing in circle every m原创 2017-07-18 15:10:20 · 798 阅读 · 0 评论 -
(扩展欧几里得)Modular Inverse--Zoj
Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KB The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (modm). This is equiv原创 2017-08-30 10:27:07 · 221 阅读 · 0 评论 -
Miller-Rabin素数检测算法
模板来自https://blog.csdn.net/zengaming/article/details/51867240# include <stdio.h># include <stdlib.h> typedef long long ll; ll ModMul(ll a,ll b,ll n)//快速积取模 a*b%n { ll ans=0;...原创 2018-04-22 21:27:35 · 326 阅读 · 0 评论