
ACM_数论
DATELOST
I'm curious.
展开
-
POJ-2417 Baby-Step Giant-Step
DescriptionGiven a prime P, 2 <= P < 2 ^ 31, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete logarithm of N, base B, modulo P. That is, find an integer ...原创 2020-01-10 23:45:54 · 197 阅读 · 0 评论 -
CF-1165D 分解质因子
D. Almost All DivisorsWe guessed some integer number x. You are given a list of almost all its divisors. Almost all means that there are all divisors except 1 and x in the list.Your task is to find ...原创 2019-05-15 09:58:47 · 222 阅读 · 0 评论 -
HDU-3864 Pollar_Rho算法
Problem DescriptionOregon Maple was waiting for Bob When Bob go back home. Oregon Maple asks Bob a problem that as a Positive number N, if there are only four Positive number M makes Gcd(N, M) == M t...原创 2019-05-09 14:37:01 · 262 阅读 · 0 评论 -
HDU-5391 威尔逊定理
Problem DescriptionTina Town is a friendly place. People there care about each other.Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes 1 time as l...原创 2019-05-09 12:14:32 · 184 阅读 · 0 评论 -
HDU-2138 Miller_Rabin算法
Problem DescriptionGive you a lot of positive integers, just to find out how many prime numbers there are.InputThere are a lot of cases. In each case, there is an integer N representing the number ...原创 2019-05-09 11:29:40 · 125 阅读 · 0 评论 -
HDU-4135 容斥
Problem DescriptionGiven a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two integers are said to be co-prime or relatively prime ...原创 2019-05-08 21:15:39 · 108 阅读 · 0 评论 -
CF 1155C gcd
C. Alarm Clocks EverywhereIvan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the xi-th minute. Ivan doesn’t ...原创 2019-04-23 21:21:41 · 189 阅读 · 0 评论 -
POJ-1006 中国剩余定理(CRT)
DescriptionSome 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 h...原创 2019-04-17 20:00:25 · 190 阅读 · 0 评论 -
哈尔滨工业大学(威海)第九届ACM程序设计竞赛 J逆元
链接:https://ac.nowcoder.com/acm/contest/624/J来源:牛客网题目描述Do you know bubble sort algorithm? It’s one of the most famous sorting algorithms.The bubble sort algorithm is stable, which can be described ...原创 2019-04-14 19:24:38 · 387 阅读 · 0 评论 -
HDU-1019 LCM
Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15...原创 2019-02-24 22:16:19 · 115 阅读 · 0 评论 -
HDU-1014 线性同余法
Problem DescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere ‘%’ is the modul...原创 2019-02-22 21:04:46 · 174 阅读 · 0 评论 -
HDU-1013 同余定理
Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting...原创 2019-02-22 19:58:06 · 230 阅读 · 0 评论