自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

wust_cyl的博客

对博客有任何意见或建议,欢迎评论进行反馈

  • 博客(36)
  • 收藏
  • 关注

原创 POJ - 3993(数论)

问题描述:Any positive integer v can be written as p 1 a1*p 2 a2*...*p n an where p i is a prime number and ai ≥ 0. For example: 24 = 2 3*3 1. Pick any two prime numbers p 1 and p 2 where p 1 = p 2. Imagin...

2017-08-31 19:04:24 277

原创 LightOJ - 1118 (计算几何模板)

问题描述:In the biological lab, you were examining some of the molecules. You got some interesting behavior about some of the molecules. There are some circular molecules, when two of them collide, th

2017-08-31 18:58:00 253

原创 HDU - 1700(计算几何)

问题描述:There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each other you

2017-08-31 08:40:24 383

原创 poj-3604(数论+推导)

问题描述:Professor Ben is an old stubborn man teaching mathematics in a university. He likes to puzzle his students with perplexing (sometimes boring) problems. Today his task is: for a given integer N, a...

2017-08-29 19:57:38 471

原创 zoj-3806(几何+二分)

问题描述:A triangle is one the basic shapes in geometry. It's a polygon with three vertices and three sides which are line segments. A triangle with vertices A, B, C is denoted ΔABC. And its three sides, ...

2017-08-29 19:21:40 287

原创 hdu-4565(矩阵快速幂+推导)

问题描述:A sequence S n is defined as:Sn=[(a+sqrt(b))^(n)] % m,其中[ ] 表示向下取整.Input There are several test cases, each test case in one line contains four positive integers: a, b, n, m. Where 015,

2017-08-29 08:39:16 679

原创 hdu-2842(矩阵快速幂+推导)

问题描述:Dumbear likes to play the Chinese Rings (Baguenaudier). It’s a game played with nine rings on a bar. The rules of this game are very simple: At first, the nine rings are all on the bar. The f

2017-08-28 19:14:55 879

原创 hdu-4549(矩阵快速幂+欧拉定理)

问题描述:M斐波那契数列F[n]是一种整数数列,它的定义如下: F[0] = a F[1] = b F[n] = F[n-1] * F[n-2] ( n > 1 ) 现在给出a, b, n,你能求出F[n]的值吗?Input输入包含多组测试数据; 每组数据占一行,包含3个整数a, b, n( 0 Output对每组测试数据请输出一个整

2017-08-28 14:36:17 392

原创 hdu-2256(矩阵快速幂+推导)

问题描述:一句话题目:让你求(sqrt(2)+sqrt(3))^(2*n) mod 1024.InputThe first line of input gives the number of cases, T. T test cases follow, each on a separate line. Each test case contains one positive int

2017-08-28 10:46:23 528

原创 poj-3734(矩阵快速幂+推导)

问题描述:Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math problem of painting. Suppose there are N blocks in a line and

2017-08-27 18:43:26 326

原创 poj-3982(矩阵快速幂+大数模板)

问题描述:数列A满足An = An-1 + An-2 + An-3, n >= 3 ,编写程序,给定A0, A1 和 A2, 计算A99Input输入包含多行数据 每行数据包含3个整数A0, A1, A2 (0 数据以EOF结束Output对于输入的每一行输出A99的值Sample Input1 1 1Sample Output

2017-08-27 18:32:20 343

原创 hdu-1452(约数和定理+求逆元)

问题描述:Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the rest of the division of S by 29). Take X = 1 for an exampl...

2017-08-24 09:29:25 644

原创 FZU - 1683(矩阵快速幂)

问题描述:已知 F(n)=3 * F(n-1)+2 * F(n-2)+7 * F(n-3),n>=3,其中F(0)=1,F(1)=3,F(2)=5,对于给定的每个n,输出F(0)+ F(1)+ …… + F(n) mod 2009。Input第一行是一整数m,代表总共有m个cases。Output对于每个case,输出一行。格式见样例,冒号后有一个空格。

2017-08-23 16:49:34 243

原创 poj-1284(欧拉函数+原根)

问题描叙:We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (x i mod p) | 1 <= i <= p-1 } is equal to { 1, ..., p-1 }. For example, the consecuti...

2017-08-23 09:37:31 857

原创 HYSBZ-2190(欧拉函数)&&hdu-2814(容斥原理)

问题描述:作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。       现在,C君希望你告诉他队伍整齐时能看到的学生人数。Input共一个数N。Output共一个数,即C君应看到的学生人数。Sample Input4Sample Output9HINT ...

2017-08-22 21:07:01 283

原创 poj-3696(欧拉定理+推导)

DescriptionChinese people think of '8' as the lucky digit. Bob also likes digit '8'. Moreover, Bob has his own lucky number L. Now he wants to construct his luckiest number which is the minimum among ...

2017-08-22 10:05:06 586

原创 poj-2480(数论+积性函数性质)

DescriptionLongge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some graceful algorithms. Now a problem comes: Given an integer N(1 < N < ...

2017-08-21 20:01:11 775 1

原创 bzoj-3884(指数循环节)

Description根据一些书上的记载,上帝的一次失败的创世经历是这样的:第一天, 上帝创造了一个世界的基本元素,称做“元”。第二天, 上帝创造了一个新的元素,称作“α”。“α”被定义为“元”构成的集合。容易发现,一共有两种不同的“α”。第三天, 上帝又创造了一个新的元素,称作“β”。“β”被定义为“α”构成的集合。容易发现,一共有四种不同的“β”。第四天, 上帝创造了新的元素“γ”,“γ”被定...

2017-08-21 14:56:12 345

原创 bzoj-2186 (欧拉函数+费马小定理求逆元)

Description大富翁国因为通货膨胀,以及假钞泛滥,政府决定推出一项新的政策:现有钞票编号范围为1到N的阶乘,但是,政府只发行编号与M!互质的钞票。房地产第一大户沙拉公主决定预测一下大富翁国现在所有真钞票的数量。现在,请你帮助沙拉公主解决这个问题,由于可能张数非常大,你只需计算出对R取模后的答案即可。R是一个质数。Input第一行为两个整数T,R。R<=10^9+10,T<=10...

2017-08-21 11:17:18 416

原创 hdu-3307 (欧拉定理+推导)

Problem Descriptionan = X*an-1 + Y and Y mod (X-1) = 0.Your task is to calculate the smallest positive integer k that ak mod a0 = 0.InputEach line will contain only three integers X, Y, a0 ( 1 < X ...

2017-08-20 18:44:32 817 1

原创 hdu -2837(指数循环节+欧拉函数)

Problem DescriptionAssume that f(0) = 1 and 0^0=1. f(n) = (n%10)^f(n/10) for all n bigger than zero. Please calculate f(n)%m. (2 ≤ n , m ≤ 10^9, x^y means the y th power of x).InputThe first line cont...

2017-08-20 09:36:29 633

原创 hdu-5446(中国剩余定理+lucas)

Problem DescriptionOn the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep i...

2017-08-18 09:49:01 491

原创 zoj-3721(贪心)

In Zhejiang University, there are N different courses labeled from 1 toN. Each course has its own time slot during the week. We can represent the time slot of a course by an left-closed right-open int...

2017-08-17 17:53:36 289

原创 poj-2504 (计算几何)

DescriptionThe Archeologists of the Current Millenium (ACM) now and then discover ancient artifacts located at vertices of regular polygons. The moving sand dunes of the desert render the excavation

2017-08-17 08:41:39 368

原创 lightoj-1289(数论+素数打表)

Given an integer n, you have to findlcm(1, 2, 3, ..., n)lcm means least common multiple. For example lcm(2, 5, 4) = 20, lcm(3, 9) = 9, lcm(6, 8, 12) = 24.InputInput starts with an integer T (≤ 10000),...

2017-08-16 19:51:15 633 1

原创 hdu-2142(扩展欧几里得解不定方程)

 DescriptionMs. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300mg weights and 700mg weights, she can p...

2017-08-16 17:04:54 399

原创 hdu-4596(扩展欧几里得解一次不定方程)

Problem DescriptionIn the year 3013, it has been 1000 years since the previous predicted rapture. However, the Maya will not play a joke any more and the Rapture finally comes in. Fortunately people h...

2017-08-16 14:26:46 344

原创 poj-2773(数论+容斥原理+二分)

DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relatively prime to 2006.Now your job is ea...

2017-08-16 08:37:37 419

原创 hdu-3270(扩展欧几里得)

Problem DescriptionWe will consider a linear Diaphonic equation here and you are to find out whether the equation is solvable in non-negative integers or not.Easy, is not it?InputThere will be multipl...

2017-08-15 11:14:55 496

原创 hdu-2669(扩展欧几里得)

Problem DescriptionGirls are clever and bright. In HDU every girl like math. Every girl like to solve math problem!Now tell you two nonnegative integer a and b. Find the nonnegative integer X and inte...

2017-08-15 09:30:44 440

原创 hdu-1370(中国剩余定理余数互质)&&hdu-1573(中国剩余定理余数不互质)

中国剩余定理是用来求解一次同余方程组问题的重要方法,是数论的一个重要定理。对于同余方程组:     x=a1 mod n1     x=a2  mod n2     ......................     x=ak  mod nk我们就可以利用中国剩余定理来求解x!下面我们分俩种情况来求解:1  当n1  n2     nk俩俩互质时的情况:我们由方程组第一个式子可以得到:x1=n1...

2017-08-14 20:55:16 302

原创 hdu 1695(欧拉公式,容斥原理||莫比乌斯反演)

                                                        GCD                                                             Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe...

2017-08-13 20:47:41 580 1

原创 hdu 1521(指数型母函数)

排列组合Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4354    Accepted Submission(s): 1857Problem Description有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两...

2017-08-13 20:34:28 288

原创 hdu 2069(母函数)

                                                     Coin Change                                                               Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Ja...

2017-08-13 20:20:47 400

原创 poj 3406 (勒让德定理)

Last digitTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3168 Accepted: 966DescriptionDetermine the last nonzero digit in value of expression.Inp

2017-08-13 20:00:48 562

原创 POJ 3962 (三分的利用)

Dome of CircusTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 862 Accepted: 177 Special JudgeDescriptionA travelling circus faces a tough challenge in designing the dome for its performances...

2017-08-11 08:45:06 386

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除