随笔分类 -  数学--数论

摘要:Let’s introduce some definitions that will be needed later. Let 𝑝𝑟𝑖𝑚𝑒(𝑥) be the set of prime divisors of 𝑥. For example, 𝑝𝑟𝑖𝑚𝑒(140)={2,5,7 阅读全文
posted @ 2019-10-01 10:15 千摆渡Qbd 阅读(463) 评论(0) 推荐(0)
摘要:A - Happy 2006 POJ - 2773 (欧拉函数) 题意:求第k个与n互质的数(k大于n) 题解:gcd(a,b) = gcd(b,a % b) = gcd(b, a + b * n)可见,与b的gcd == 1的数是可以轮回的,那么这就可以先预先处理出小于n的数厘米的与n互质的,然后 阅读全文
posted @ 2019-09-03 19:06 千摆渡Qbd 阅读(316) 评论(0) 推荐(0)
摘要:求 (a ^ a ^ a... ^ a) mod p,b个a的幂塔 https://nanti.jisuanke.com/t/41299 阅读全文
posted @ 2019-09-01 22:45 千摆渡Qbd 阅读(186) 评论(0) 推荐(0)
摘要:题目描述 目前,SARS 病毒的研究在世界范围内进行,经科学家研究发现,该病毒及其变种的 DNA 的一条单链中,胞嘧啶、腺嘧啶均是成对出现的。这虽然是一个重大发现,但还不是该病毒的最主要特征,因为这个特征实在太弱了。 为了进一步搞清楚该病毒的特征,CN 疾病控制中心和阿里巴巴集团合作,用科技的力量和 阅读全文
posted @ 2019-08-29 16:45 千摆渡Qbd 阅读(224) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-08-29 16:41 千摆渡Qbd 阅读(106) 评论(0) 推荐(0)
摘要:题意: x + y = b(mod p) x * y = c(mod p) 题目给出b,c ,p = 1e9 + 7,求解x y 要求(0≤x≤y<p),若没有可行解,输出-1 -1 题解: x + y = b(mod p) 可得 (x + y) ^ 2 = (b * b)(mod p). 再可得 阅读全文
posted @ 2019-08-16 13:52 千摆渡Qbd 阅读(294) 评论(0) 推荐(0)
摘要:素数模的二次同余方程 求解 牛客第九场Quadratic equation #include<cstdio> using namespace std; const long long mod = 1e9 + 7; #define LL long long LL B,C; LL Pow(LL a,LL 阅读全文
posted @ 2019-08-16 13:33 千摆渡Qbd 阅读(196) 评论(0) 推荐(0)
摘要:A * B Problem Plus HDU - 1402 (FFT) Calculate A * B. InputEach line will contain two integers A and B. Process to end of file. Note: the length of eac 阅读全文
posted @ 2019-01-27 17:36 千摆渡Qbd 阅读(131) 评论(0) 推荐(0)