TheCountofMonteCrist
TheCountofMonteCrist
全部文章
ACM
未归档(2)
线段树模板(10)
归档
标签
去牛客网
登录
/
注册
TheCountofMonteCrist的博客
全部文章
/ ACM
(共182篇)
D. Same GCDs (Educational Codeforces Round 81 (Rated for Div. 2))
D. Same GCDs You are given two integers a and m. Calculate the number of integers x such that 0≤x<m and gcd(a,m)=gcd(a+x,m) Note: gcd(a,b) is the...
2020-07-17
0
382
HDU 5784 数锐角三角形个数(极角排列+尺取法)
http://acm.hdu.edu.cn/showproblem.php?pid=5784 How Many Triangles Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Other...
2020-07-17
0
406
GCD类模板
快速幂1 ll quickpow(ll x, ll y, ll mod) { if (y == 0)return 1; if (y == 1)return x % mod; else { if (y % 2 == 0) { ll t = quickpow(x, y / 2,...
2020-07-17
0
359
E 牛牛的随机数
链接:https://ac.nowcoder.com/acm/contest/3004/E 来源:牛客网 题目描述 牛牛和牛可乐是一对好朋友,现在牛牛从值域[l1,r1]中随机给出一个数字a,牛可乐从值域[l2,r2]中随机给出一个数字b。问你a⊕ b的数学期望。其中⊕为位运算符,表示按位取...
2020-07-17
0
326
龙哥的问题
龙哥现在有一道题,要考考大家。 给定一个整数N,请你求出∑(1≤i≤N)gcd(i,N)的值。 输入格式 一个整数N。 输出格式 一个整数表示结果。 数据范围 1<N<2^31 输入样例: 6 输出样例:a 15 思路:欧拉反演公式带一带就行,用O(...
2020-07-17
0
469
220.最大公约数(ACwing)
给定整数N,求1<=x,y<=N且GCD(x,y)为素数的数对(x,y)有多少对。 GCD(x,y)即求x,y的最大公约数。 输入格式 输入一个整数N 输出格式 输出一个整数,表示满足条件的数对数量。 数据范围 1≤N≤10^7 输入样例: 4 输出样例: ...
2020-07-17
0
405
Keyboard Free (计算几何)2020牛客多校第二场
题目描述 Given three concentric circles whose radiuses are r_1, r_2, r_3r1,r2,r3 respectively, and {A,B,C}A,B,C are the moving points on the given th...
2020-07-17
0
574
D. Same GCDs (Educational Codeforces Round 81 (Rated for Div. 2))
D. Same GCDs You are given two integers a and m. Calculate the number of integers x such that 0≤x<m and gcd(a,m)=gcd(a+x,m) Note: gcd(a,b) is the...
2020-07-17
0
462
GCD类模板
快速幂1 ll quickpow(ll x, ll y, ll mod) { if (y == 0)return 1; if (y == 1)return x % mod; else { if (y % 2 == 0) { ll t = quickpow(x, y / 2,...
2020-07-17
0
333
龙哥的问题
龙哥现在有一道题,要考考大家。 给定一个整数N,请你求出∑(1≤i≤N)gcd(i,N)的值。 输入格式 一个整数N。 输出格式 一个整数表示结果。 数据范围 1<N<2^31 输入样例: 6 输出样例:a 15 思路:欧拉反演公式带一带就行,用O(...
2020-07-17
0
328
首页
上一页
10
11
12
13
14
15
16
17
18
19
下一页
末页