上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: D.装饰 列方程 #include <iostream> #include<cstdio> #include<algorithm> typedef long long ll; using namespace std; ll a[5]; int main() { int t;scanf("%d",&t 阅读全文
posted @ 2019-01-18 12:03 l..q 阅读(127) 评论(0) 推荐(0)
摘要: C.最大公约数II 分解因子+欧拉函数 #include <iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> typedef long long ll; using namespace s 阅读全文
posted @ 2019-01-17 10:29 l..q 阅读(199) 评论(0) 推荐(0)
摘要: B.和数检测 离散化 #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> typedef long long ll; using namespace std; ll a[1000005],b[10000 阅读全文
posted @ 2019-01-16 11:03 l..q 阅读(229) 评论(0) 推荐(0)
摘要: A.小迟的比赛 最优策略永远是努力应战,dp[i][j]表示前i轮赢了j局的概率,dp[i][j]=dp[i-1][j]*(1-p[i][j])+dp[i-1][j-1]*p[i-1][j-1] #include <iostream> #include<cstdio> #include<cstrin 阅读全文
posted @ 2019-01-15 11:22 l..q 阅读(199) 评论(0) 推荐(0)
摘要: B.数论number 欧拉降幂定理 #include <iostream> #include<cstdio> #include<cmath> #include<algorithm> typedef long long ll; using namespace std; ll a,b,c,p; ll q 阅读全文
posted @ 2019-01-14 21:25 l..q 阅读(132) 评论(0) 推荐(0)
摘要: A.发财兔1A O(nlogn) #include <iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<map> typedef long long ll; using 阅读全文
posted @ 2019-01-13 16:52 l..q 阅读(131) 评论(0) 推荐(0)
摘要: A.新年礼物 #include <iostream> #include<cstdio> #include<cstring> #include<cmath> #include<ctype.h> #include<algorithm> #define inf 0x3f3f3f3f #define mod 阅读全文
posted @ 2019-01-01 14:28 l..q 阅读(162) 评论(0) 推荐(0)
摘要: A. #include <iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; char s[65]; int main() { int n;scan 阅读全文
posted @ 2018-12-28 16:45 l..q 阅读(387) 评论(0) 推荐(0)
摘要: 题目描述 给一个长度为n的序列a。1≤a[i]≤n。m组询问,每次询问一个区间[l,r],是否存在一个数在[l,r]中出现的次数大于(r-l+1)/2。如果存在,输出这个数,否则输出0。 输入 第一行两个数n,m(n,m≤500000)。第二行n个数,a[i]。接下来m行,每行两个数l,r,表示询问 阅读全文
posted @ 2018-12-27 12:34 l..q 阅读(198) 评论(0) 推荐(0)
摘要: 题目描述 维护一个长度为n的序列,一开始都是0,支持以下两种操作:1.U k a 将序列中第k个数修改为a。2.Z c s 在这个序列上,每次选出c个正数,并将它们都减去1,询问能否进行s次操作。每次询问独立,即每次询问不会对序列进行修改。 输入 第一行包含两个正整数n,m(1<=n,m<=1000 阅读全文
posted @ 2018-12-13 18:16 l..q 阅读(257) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页