- 博客(8)
- 收藏
- 关注
原创 TIANKENG’s restaurant HDU - 4883
TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today n groups of customers come to enjoy their meal, and
2017-06-09 13:20:20 273
原创 The Luckiest number POJ - 3696 (欧拉函数)
Chinese 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 all positive
2017-06-07 21:29:16 379
原创 Description has only two Sentences HDU - 3307(欧拉函数)(数论定理)
a n = X*a n-1 + Y and Y mod (X-1) = 0. Your task is to calculate the smallest positive integer k that a k mod a 0 = 0. Input Each line will contain only three integers X, Y, a 0 ( 1 < X < 2 31, 0
2017-06-07 16:26:33 366
原创 X问题 HDU - 1573 (中国剩余定理)(非互质情况)
求在小于等于N的正整数中有多少个X满足:X mod a00 = b00, X mod a11 = b11, X mod a22 = b22, …, X mod aii = bii, … (0 < aii <= 10)。 Input 输入数据的第一行为一个正整数T,表示有T组测试数据。每组测试数据的第一行为两个正整数N,M (0 < N <= 1000,000,000 , 0 < M <= 10)
2017-06-07 12:34:14 417
原创 Biorhythms POJ - 1006 (中国剩余定理)
Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods o
2017-06-06 16:23:50 367
原创 Astronomy POJ - 3101(LCM 和DCD)
There are n planets in the planetary system of star X. They orbit star X in circular orbits located in the same plane. Their tangent velocities are constant. Directions of orbiting of all planets are t
2017-06-06 11:15:30 397
原创 Gerald and Giant Chess (CodeForces - 560E)(组合数)
Giant chess is quite common in Geraldion. We will not delve into the rules of the game, we’ll just say that the game takes place on an h × w field, and it is painted in two colors, but not like in ches
2017-06-05 21:26:31 513
原创 关于求组合数的一些总结
对于求C(n,m) 1.如果是对于小范围内的n和m(不是很难)就不说了 差不多用java的大数就可以了 2.当n在1e10^5范围左右,往往是会有取模,设这个数为mod(往往mod为质数,这个很重要)。 既然是组合数,就免不了有阶乘的部分, n 的范围在10^5的数量级,所以完全可以线性扫一遍,用一个fac数组存i的阶乘对mod取模即可, 但是对于除法取模,必须得用到逆元,所以还是需要去
2017-06-05 20:49:16 1913
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人