
数学问题
文章平均质量分 67
xtulollipop
这个作者很懒,什么都没留下…
展开
-
hdu5597GTW likes function+欧拉函数
Problem Description Now you are given two definitions as follows.f(x)=∑xk=0(−1)k22x−2kCk2x−k+1,f0(x)=f(x),fn(x)=f(fn−1(x))(n≥1)f(x)=∑^x_{k=0}(−1)^k2^{2x−2k}C^k_{2x−k+1},f_0(x)=f(x),f_n(x)=f(f_{n−1}(x)原创 2016-10-08 15:45:28 · 334 阅读 · 0 评论 -
51nod1719数值计算+二分
令F(x)=∑wk=1(Ak+sin(k)sin(x+k)+Bk+cos(k)cos(x+k)) F(x)=∑^w_{k=1}(\frac {A}{k+sin(k)}sin(x+k)+\frac{B}{k+cos(k)}cos(x+k)) 求F(x)=0的前n小的正根的和。 n<=3e6,A<=1e3,B<=1e3n<=3e6,A<=1e3,B<=1e3 其中w是定值,为1e4 保留到小数原创 2016-09-28 11:56:57 · 398 阅读 · 0 评论 -
51nod1668非010串+矩阵快速幂
如果一个01字符串满足不存在010这样的子串,那么称它为非010串。 求长度为n的非010串的个数。(对1e9+7取模) Input一个数n,表示长度。(n<1e15)Output长度为n的非010串的个数。(对1e9+7取模)Input示例3Output示例7解释: 000 001 011 100 101 110 111对于这样的一个式子我们可以很快的写出dp的做法#includ原创 2016-09-28 11:42:37 · 651 阅读 · 0 评论 -
hdu5525Product+约数的乘积
Product Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1003 Accepted Submission(s): 231Problem Description Given a number sequence A1,A原创 2016-09-30 00:19:44 · 636 阅读 · 0 评论 -
CFGym 100803DSpace Golf+物理(数学)计算
给出起点,终点,和n个柱子,小球最多可以在中间弹跳b次。(不算起点,终点),问最小的初速度。 解法:枚举落地次数。 解法类似于http://blog.youkuaiyun.com/xtulollipop/article/details/52789712。。 先判断最小速度能不能到达。不能大话他肯定与某个柱子相切。枚举柱子,找到一个能让所有柱子都不相撞的函数。。取最小值。。#include<bits/std原创 2016-10-11 17:17:34 · 595 阅读 · 0 评论 -
acdream1221Little Jumper+三分
Problem Description Little frog Georgie likes to jump. Recently he have discovered the new playground that seems the perfect place to jump. Recently the new jumping exercise has become very popular.原创 2016-10-11 17:06:35 · 551 阅读 · 0 评论 -
hdu5902GCD is Funny+数论
Problem Description Alex has invented a new game for fun. There are n integers at a board and he performs the following moves repeatedly:He chooses three numbers a, b and c written at the board and e原创 2016-09-25 22:21:37 · 1119 阅读 · 0 评论 -
hdu5204Rikka with sequence+数学
Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta have a sequence. Because the sequence is原创 2016-09-25 20:53:43 · 367 阅读 · 0 评论 -
hdu5894hannnnah_j’s Biological Test+组合数学+Lucas
Problem Description hannnnah_j is a teacher in WL High school who teaches biology.One day, she wants to test m students, thus she arranges n different seats around a round table.In order to prevent ch原创 2016-09-21 15:37:07 · 445 阅读 · 0 评论 -
hdu5211Mutiple+数论
Description WLD likes playing with a sequence . One day he is playing with a sequence of integers. For every index i, WLD wants to find the smallest index ( if exists ), that , and mod =原创 2016-09-20 21:57:19 · 408 阅读 · 0 评论 -
hdu5207Greatest Greatest Common Divisor+枚举
Description Pick two numbers from a sequence to maximize the value of their greatest common divisor.Input Multiple test cases. In the first line there is an integer , indicating the number of原创 2016-09-20 21:15:15 · 419 阅读 · 0 评论 -
hdu5901Count primes+Lehmer求1-n的质数个数
Problem Description Easy question! Calculate how many primes between [1…n]!Input Each line contain one integer n(1 <= n <= 1e11).Process to end of file.Output For each case, output the number of pri原创 2016-09-18 20:34:55 · 783 阅读 · 5 评论 -
hdu5912Fraction+式子计算
Problem Description Mr. Frog recently studied how to add two fractions up, and he came up with an evil idea to trouble you by asking you to calculate the result of the formula below: As a talent, can原创 2016-10-08 23:01:00 · 505 阅读 · 0 评论 -
hdu5895Mathematician QSC+矩阵快速幂+除法取余
Problem Description QSC dream of becoming a mathematician, he believes that everything in this world has a mathematical law.Through unremitting efforts, one day he finally found the QSC sequence, it i原创 2016-09-18 20:14:34 · 1090 阅读 · 0 评论 -
BZOJ1257余数之和sum+数学
Description给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值,其中k mod i表示k除以i的余数。例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5=0+1+0+3+3=7Input输入仅一行,包含两个整数n, k。Output输出仅一行,即j(n,原创 2016-09-03 23:50:43 · 467 阅读 · 0 评论 -
hdu4497GCD and LCM+数论
Description Given two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L? Note, gcd(x, y, z) means the great原创 2016-09-28 21:32:49 · 562 阅读 · 0 评论 -
SYSBZ3930选数+区间中gcd==k的个数
Description我们知道,从区间[L,H](L和H为整数)中选取N个整数,总共有(H-L+1)^N种方案。小z很好奇这样选出的数的最大公约数的规律,他决定对每种方案选出的N个整数都求一次最大公约数,以便进一步研究。然而他很快发现工作量太大了,于是向你寻求帮助。你的任务很简单,小z会告诉你一个整数K,你需要回答他最大公约数刚好为K的选取方案有多少个。由于方案数较大,你只需要输出其除以100000原创 2016-09-28 22:27:14 · 672 阅读 · 0 评论 -
hdu5584LCM Walk+gcd
Problem Description A frog has just learned some number theory, and can’t wait to show his ability to his girlfriend.Now the frog is sitting on a grid map of infinite rows and columns. Rows are number原创 2016-10-07 21:04:39 · 602 阅读 · 0 评论 -
poj1845Sumdiv+约数和定理
Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).Input The only line contains the two原创 2016-10-03 14:21:45 · 364 阅读 · 0 评论 -
hdu5297Y sequence+容斥+迭代
Description Yellowstar likes integers so much that he listed all positive integers in ascending order,but he hates those numbers which can be written as a^b (a, b are positive integers,2<=b<=r),so he原创 2016-10-02 22:19:05 · 427 阅读 · 0 评论 -
hdu5514Frogs+容斥
Problem Description There are m stones lying on a circle, and n frogs are jumping over them. The stones are numbered from 0 to m−1 and the frogs are numbered from 1 to n. The i-th frog can jump over原创 2016-10-01 22:43:32 · 1185 阅读 · 0 评论 -
cf615Multipliers+N的约数的乘积
DescriptionAyrat has number n, represented as it’s prime factorization pi of size m, i.e. n = p1·p2·…·pm. Ayrat got secret information that that the product of all divisors of n taken modulo 109 + 7 is原创 2016-09-30 00:15:22 · 610 阅读 · 0 评论 -
BZOJ 2818: 欧拉筛法求gcd(x,y)==k(k为质数)
Description给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的 数对(x,y)有多少对.Input一个整数NOutput如题Sample Input4Sample Output4Hinthint对于样例(2,2),(2,4),(3,3),(4,2)1<=N<=10^7GCD(px,py)==p; 有GCD(x,y)==1,在1-n/p的情况数。即1-n/p的欧拉和。p为质数。原创 2016-09-29 21:19:00 · 1695 阅读 · 0 评论 -
codeforces574C数论
DescriptionLimak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are n players (including Limak himself) and right now all of them have bids on the table原创 2016-09-29 17:55:20 · 462 阅读 · 1 评论 -
hdu1071The area+数学积分
gnatius bought a land last week, but he didn’t know the area of the land because the land is enclosed by a parabola and a straight line. The picture below shows the area. Now given all the intersectant原创 2016-10-15 20:51:17 · 1920 阅读 · 0 评论 -
hdu1155Bungee Jumping+物理数学计算
Description Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enem原创 2016-10-15 20:44:02 · 417 阅读 · 0 评论 -
hdu5826physics+数学积分
Problem Description There are n balls on a smooth horizontal straight track. The track can be considered to be a number line. The balls can be considered to be particles with the same mass.At the begi原创 2016-10-15 20:36:41 · 367 阅读 · 0 评论 -
hdu3306Another kind of Fibonacci+矩阵快速幂
Description As we all known , the Fibonacci series : F(0) = 1, F(1) = 1, F(N) = F(N - 1) + F(N - 2) (N >= 2).Now we define another kind of Fibonacci : A(0) = 1 , A(1) = 1 , A(N) = X * A(N - 1) + Y * A原创 2016-10-15 17:18:52 · 344 阅读 · 0 评论 -
hdu3306Interesting Yang Yui Triangle+LUCAS定理
Description Harry is a Junior middle student. He is very interested in the story told by his mathematics teacher about the Yang Hui triangle in the class yesterday. After class he wrote the following原创 2016-10-15 16:21:11 · 487 阅读 · 0 评论 -
hdu2554N对数的排列问题+数学推论
Description 有N对双胞胎,他们的年龄分别是1,2,3,……,N岁,他们手拉手排成一队到野外去玩,要经过一根独木桥,为了安全起见,要求年龄大的和年龄小的排在一起,好让年龄大的保护年龄小的,然后从头到尾,每个人报告自己的年龄,就得到了一个年龄的序列。比如有4对双胞胎,他们报出来的年龄序列是:41312432。突然,他们中间最聪明的小明发现了一个有趣的现象,原来,这个年龄序列有一个规律,两个原创 2016-10-15 14:45:55 · 1037 阅读 · 0 评论 -
hdu2552三足鼎立+数学推论
MCA山中人才辈出,洞悉外界战火纷纷,山中各路豪杰决定出山拯救百姓于水火,曾以题数扫全场的威士忌,曾经高数九十九的天外来客,曾以一剑铸十年的亦纷菲,歃血为盟,盘踞全国各个要塞(简称全国赛)遇敌杀敌,遇佛杀佛,终于击退辽军,暂时平定外患,三人位置也处于稳态。可惜辽誓不甘心,辽国征南大将军<耶律javac++>欲找出三人所在逐个击破,现在他发现威士忌的位置s,天外来客的位置u,不过很难探查到亦纷菲v所在原创 2016-10-15 14:01:51 · 401 阅读 · 0 评论 -
codeforces454CLittle Pony and Expected Maximum+数学期望
DescriptionTwilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twilight Sparkle became interested in the dic原创 2016-09-03 20:56:09 · 360 阅读 · 0 评论 -
codeforces687BRemainders Game+数论
Today Pari and Arya are playing a game called Remainders.Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value . There are n ancient numbers c1, c2, …, cn a原创 2016-08-31 22:36:28 · 528 阅读 · 0 评论 -
hdu5762Teacher Bo+曼哈顿距离
Problem Description Teacher BoBo is a geography teacher in the school.One day in his class,he marked N points in the map,the i-th point is at (Xi,Yi).He wonders,whether there is a tetrad (A,B,C,D)(A<原创 2016-07-26 21:16:40 · 553 阅读 · 0 评论 -
hdu5753Permutation Bo+数学期望
Problem Description There are two sequences h1∼hn and c1∼cn. h1∼hn is a permutation of 1∼n. particularly, h0=hn+1=0.We define the expression [condition] is 1 when condition is True,is 0 when condition原创 2016-07-26 20:54:43 · 443 阅读 · 0 评论 -
hdu5761Rower Bo+数学积分
Problem Description There is a river on the Cartesian coordinate system,the river is flowing along the x-axis direction.Rower Bo is placed at (0,a) at first.He wants to get to origin (0,0) by boat.Boa原创 2016-07-26 20:28:24 · 704 阅读 · 0 评论 -
codeforces#364DAs Fast As Possible
On vacations n pupils decided to go on excursion and gather all together. They need to overcome the path with the length l meters. Each of the pupils will go with the speed equal to v1. To get to the e原创 2016-07-23 22:18:03 · 809 阅读 · 0 评论 -
hdu5685Problem A+线性同余
Problem Description 度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到:H(s)=∏i≤len(s)i=1(Si−28) (mod 9973) //我也是没办法。。h(S)是字符串的每个字符-28的乘积再mod9973;原创 2016-06-03 21:43:26 · 626 阅读 · 0 评论 -
hdu5698瞬间移动+杨辉三角+LUCAS
Problem Description 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第n行第m列的格子有几种方案,答案对1000000007取模。Input 多组测试数据。两个整数n,m(2≤n,m≤100000)Output 一个整数表示答案Sample Input4 5Sample Ou原创 2016-06-03 20:27:19 · 404 阅读 · 0 评论 -
hdu5651xiaoxin juju needs help 乘法的逆元||重复元素的排列
Problem Description As we all known, xiaoxin is a brilliant coder. He knew palindromic strings when he was only a six grade student at elementry school.This summer he was working at Tencent as an inte原创 2016-03-29 15:37:24 · 427 阅读 · 0 评论