上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页
摘要: https://codeforces.com/gym/102012 A.Rikka with Minimum Spanning Trees(求最小生成树个数与总权值的乘积) 阅读全文
posted @ 2019-08-11 21:23 Snow_in_winer 阅读(935) 评论(0) 推荐(0) 编辑
摘要: 题目描述 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:1.插入x数2.删除x数(若有多个相同的数,因只删除一个)3.查询x数的排名(若有多个相同的数,因输出最小的排名)4.查询排名为x的数5.求x的前驱(前驱定义为小于x,且最大的数)6.求x的后继(后继定义为大于x, 阅读全文
posted @ 2019-08-11 18:46 Snow_in_winer 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 输入 一个整数N(1≤N≤10^7) 输出 样例输入 样例输出 提示 对于样例(2,2),(2,4),(3,3),(4,2) 对于样例(2,2),(2,4),(3,3),(4,2) #include <bi 阅读全文
posted @ 2019-08-11 15:13 Snow_in_winer 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int maxn=1100; typedef long long ll; ll phi[maxn],ans,prime[maxn],n,tot; bool vis[maxn]; void get_euler(ll n) { phi[1]=1; for (int i=2; i<=n; i++)... 阅读全文
posted @ 2019-08-11 11:30 Snow_in_winer 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Hanks 博士是 BT (Bio-Tech,生物技术) 领域的知名专家,他的儿子名叫 Hankson。现在,刚刚放学回家的 Hankson 正在思考一个有趣的问题。今天在课堂上,老师讲解了如何求两个正整数 c1 和 c2 的最大公约数和最小公倍数。现在 Hankson 认为自己已经熟练地 阅读全文
posted @ 2019-08-11 11:28 Snow_in_winer 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值其中k mod i表示k除以i的余数。例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5=0+1+0+ 阅读全文
posted @ 2019-08-11 11:26 Snow_in_winer 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 题目描述 The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreti 阅读全文
posted @ 2019-08-11 11:23 Snow_in_winer 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题目描述 对于任何正整数x,其约数的个数记作g(x)。例如g(1)=1、g(6)=4。如果某个正整数x满足:g(x)>g(i) 0<i<x,则称x为反质数。例如,整数1,2,4,6等都是反质数。现在给定一个数N,你能求出不超过N的最大的反质数么? 输入 一个数N(1<=N<=2,000,000,00 阅读全文
posted @ 2019-08-11 11:21 Snow_in_winer 阅读(166) 评论(0) 推荐(0) 编辑
摘要: inline int read() { int res=0,f=1; char ch=getchar(); while (!isdigit(ch)) { if (ch=='-') { f=-f; } ch=getchar(); } while (isdigit(ch)) { res=(res<<3)+(res<<1)+ch-'0'; ch=getchar(); } return f*res; } 阅读全文
posted @ 2019-08-11 10:35 Snow_in_winer 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个非负整数序列{a},初始长度为N。有M个操作,有以下两种操作类型:1、Ax:添加操作,表示在序列末尾添加一个数x,序列的长度N+1。2、Qlrx:询问操作,你需要找到一个位置p,满足l<=p<=r,使得:a[p] xor a[p+1] xor ... xor a[N] xor x 阅读全文
posted @ 2019-08-11 09:46 Snow_in_winer 阅读(223) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页