数论
swust_fangfangfang
这个作者很懒,什么都没留下…
展开
-
POJ 1183 反正切函数的应用
Description反正切函数可展开成无穷级数,有如下公式 (其中0 <= x <= 1) 公式(1) 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算PI的方法: PI=4arctan(1)=4(1-1/3+1/5-1/7+1/9-1/11+…) 公式(2) 然而,这种方法的效率很低,但我们可以根据角度和的正切函数公式: tan(a+b)=[tan(a)+tan(b)]/[1-tan(原创 2015-08-17 20:52:04 · 709 阅读 · 0 评论 -
hdu5920 Ugly Problem 回文串+高精度
Ugly ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 189 Accepted Submission(s): 73Special JudgeProblem DescriptionEve原创 2016-10-04 23:30:07 · 1352 阅读 · 4 评论 -
codeforces 17D. Notepad 欧拉函数降幂
D. Notepadtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputNick is attracted by everything unconventional. H原创 2016-08-07 11:09:09 · 817 阅读 · 0 评论 -
HDU 5690 All X
All XTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1318 Accepted Submission(s): 594Problem DescriptionF(x,m) 代表一个全是由数字x组成的m原创 2016-07-17 18:39:03 · 409 阅读 · 0 评论 -
POJ 3213 PM3 矩阵乘法优化
PM3Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 3298 Accepted: 1151DescriptionUSTC has recently developed the Parallel Matrix Multiplication Machi原创 2016-07-05 21:33:56 · 1055 阅读 · 0 评论 -
nyoj 301 递推求值 矩阵幂
给你一个递推公式:f(x)=a*f(x-2)+b*f(x-1)+c并给你f(1),f(2)的值,请求出f(n)的值,由于f(n)的值可能过大,求出f(n)对1000007取模后的值。注意:-1对3取模后等于2在涛神的协助下构造出来的矩阵:Fn b a 1 Fn-1Fn-1 = 1 00 Fn-2原创 2016-05-25 17:02:10 · 385 阅读 · 0 评论 -
POJ 3213 PM3 矩阵乘法
PM3USTC has recently developed the Parallel Matrix Multiplication Machine – PM3, which is used for very large matrix multiplication.Given two matrices A and B, where A is an N × P matrix and B is a P ×原创 2015-12-11 19:43:09 · 764 阅读 · 0 评论 -
HDUoj 1576 A/B 扩展欧几里德
A/BProblem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input 数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output 对应每组数据输出(A/B)%9973。Sample Inpu原创 2015-08-18 21:36:50 · 487 阅读 · 0 评论 -
Poj 1061青蛙的约会 扩展欧几里德
青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 98003 Accepted: 18546 Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事原创 2015-08-18 21:09:11 · 480 阅读 · 0 评论 -
Poj 1152 An Easy Problem!
DescriptionHave you heard the fact “The base of every normal number system is 10” ? Of course, I am not talking about number systems like Stern Brockot Number System. This problem has nothing to do wit原创 2015-08-18 20:38:25 · 478 阅读 · 0 评论 -
Poj 1006 Biorhythms
Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 121668 Accepted: 38345 DescriptionSome people believe that there are three cycles in a person’s life that start the d原创 2015-08-18 20:53:41 · 359 阅读 · 0 评论 -
POJ 3737 UmBasketella 三分或公式
UmBasketellaTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7955 Accepted: 3006DescriptionIn recent days, people always design new things with multifu原创 2016-10-08 15:14:37 · 738 阅读 · 0 评论