Best Solver The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26–√)1+2xy=(5+26)1+2x. For a given integer x (0≤x<232)x (0≤x<232) and a given prime number M (M≤46337)M (M≤46337),…
Problem Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. Define that the domain of function f is the set of integers from 0 to n−1, and the range of it is the set of integers from 0 to m−1. Please calculate t…
Fibonacci Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Problem Description We know the Fibonacci Sequence F1=1,F2=1,F3=2,F4=3,F5=5, ... Fx = Fx-1+Fx-2 We want to know the Mth number which has K consecutive "0&qu…
Couple doubi Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4861 Description DouBiXp has a girlfriend named DouBiNan.One day they felt very boring and decided to play some games. The rule of th…
Mathematician QSC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description QSC dream of becoming a mathematician, he believes that everything in this world has a mathematical law. Through unremitting e…
题目链接 F(N) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4579 Accepted Submission(s): 1610 Problem Description Giving the N, can you tell me the answer of F(N)? Input Each test case contains a si…
http://acm.hdu.edu.cn/showproblem.php?pid=3746 Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4498 Accepted Submission(s): 2051 Problem Description CC always becomes very dep…
Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14416 Accepted Submission(s): 6016 Problem Description CC always becomes very depressed at the end of this month, he has checke…
B. Position in Fraction time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have a fraction . You need to find the first occurrence of digit c into decimal notation of the fraction after de…
A Simple Problem with Integers 这个题目首先要打表找规律,这个对2018取模最后都会进入一个循环节,这个循环节的打表要用到龟兔赛跑. 龟兔赛跑算法 floyed判环算法 这个算法我觉得还是很有意思的,可以学习一下. 不过这个题目这个算法打表还是有点难写的. 由这个算法可以得到这个循环节的最大长度是6 最大入环距离是4. 为什么有些循环节不是6,还是可以用6呢,因为每个元素平方最大周期为6,且6是其他所有周期的公倍数. 然后学完之后还是不太会这个题目怎么写,2018…
Calculation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2272 Accepted Submission(s): 536 Problem Description Assume that f(0) = 1 and 0^0=1. f(n) = (n%10)^f(n/10) for all n bigger than ze…