
基础数学
SpongeBob_Y
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #532 C. NN and the Optical Illusion(数学)
题目链接NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on the Net, which asked him to compare the sizes of inner circles...原创 2019-01-23 11:13:24 · 982 阅读 · 0 评论 -
HDU 2068 RPG的错排(错排公式+组合数,内有错排公式详解)
题目链接今年暑假杭电ACM集训队第一次组成女生队,其中有一队叫RPG,但做为集训队成员之一的野骆驼竟然不知道RPG三个人具体是谁谁。RPG给他机会让他猜猜,第一次猜:R是公主,P是草儿,G是月野兔;第二次猜:R是草儿,P是月野兔,G是公主;第三次猜:R是草儿,P是公主,G是月野兔;......可怜的野骆驼第六次终于把RPG分清楚了。由于RPG的带动,做ACM的女生越来越多,我们的野骆驼想都知道...原创 2019-01-04 16:42:17 · 450 阅读 · 2 评论 -
最小公倍数与最大公约数问题
Codeforces Round #489 (Div. 2) B. Nastya Studies Informatics 题意:给出一个范围 l,r,两个数x,y。要求在【l,r】,找出一对a,b。使得gcd(a,b)=x,lcm(a,b)=y。问能找到多少对这样的数。题解:如果用a*b=x*y,肯定会超时。我们设a=n*x,b=x*m;就有,y=n*m*x,a*b=n*m*m*x;这样得...原创 2018-09-18 10:42:35 · 364 阅读 · 0 评论 -
Fibonacci (矩阵快速幂)
In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternati...原创 2018-07-17 01:06:04 · 1605 阅读 · 0 评论 -
LightOJ1008 Fibsieve`s Fantabulous Birthday(规律+基础数学)
Fibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was actually thinking of not having a party next year.Among these gifts there was an N x ...原创 2019-02-25 13:05:11 · 223 阅读 · 0 评论