
欧拉函数
文章平均质量分 70
DTL66
细节决定成败
展开
-
LIGHT OJ-1067 Combinations【逆元(欧拉)+快速幂+同余】
1067 - Combinations PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Given n different objects, you want to take k of them. How many ways to can do it?For exampl原创 2016-08-08 00:15:48 · 444 阅读 · 0 评论 -
HDU-1576 A/B 【逆元模板题】
G - A/BTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 1576 Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Inp原创 2016-08-08 01:10:19 · 545 阅读 · 3 评论 -
ZZULI OJ-1894 985的方格难题 【DP or 组合数取余】
985的方格难题Time Limit: 1 Sec Memory Limit: 128 MB Submit: 395 Solved: 87SubmitStatusWeb Board Description985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输原创 2016-08-09 19:49:47 · 452 阅读 · 0 评论 -
HDU-1573 X问题 【二元一次方程(讨论)+CRT(模方程合并)】
D - X问题Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description求在小于等于N的正整数中有多少个X满足:X mod a[0] = b[0], X mod a[1] = b[1], X mod a[2] = b[2], …, X mod a[i] = b[i], … (0原创 2016-09-02 23:48:42 · 534 阅读 · 0 评论 -
POJ 2407 Relatives 【Euler模板(单个求)】
RelativesTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two intege原创 2016-09-03 14:18:40 · 396 阅读 · 0 评论 -
BZOJ 2705 [SDOI2012]Longge的问题【Euler变形】
2705: [SDOI2012]Longge的问题Time Limit: 3 Sec Memory Limit: 128 MBSubmit: 2418 Solved: 1474[Submit][Status][Discuss]DescriptionLongge的数学成绩非常好,并且他非常乐于挑战高难度的数学问题。现在问题来了:给定一个整数N,你需要求出∑gcd(i,原创 2016-09-03 21:40:38 · 357 阅读 · 0 评论 -
POJ 1142 Smith Numbers【Euler分解质因数】
Smith NumbersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13574 Accepted: 4626DescriptionWhile skimming his phone directory in 1982, Albert Wilansky,原创 2016-09-03 23:00:43 · 503 阅读 · 0 评论 -
HYSBZ 2190 仪仗队【容斥原理 OR Euler(两种)】
仪仗队Time Limit:10000MS Memory Limit:265216KB 64bit IO Format:%lld & %llu Description 作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C原创 2016-09-03 18:08:07 · 337 阅读 · 0 评论