totaled
totaled
全部文章
分类
atcoder(1)
codeforces(6)
leetcode(17)
Linux(5)
操作系统(2)
数据结构(7)
未归档(1)
算法(23)
网络编程(1)
计算机网络(5)
题解(84)
归档
标签
去牛客网
登录
/
注册
qin_peng
O_O
TA的专栏
10篇文章
0人订阅
Hello Code
10篇文章
8715人学习
全部文章
(共154篇)
1181 C.Flag
1181 C.Flag 给定一个矩阵图案,找到有几种图形满足上面不等于中面,中面不等于下面. 处理高度数组 ,宽度数组 即可.对答案贡献就是 . #include<bits/stdc++.h> #define sc scanf using namespace std; co...
2019-08-06
0
657
codefroces 1182E
1182 E. Product Oriented Recurrence . . . . #include<bits/stdc++.h> #define me(a,x) memset(a,x,sizeof(a)) #define sc scanf #define itn i...
2019-08-06
0
729
Sum Equals Xor
Sum Equals Xor You are given a positive integer in base two.How many pairs of non-negative integers satisfy the following conditions? Since the...
2019-08-06
0
597
K 个不同整数的子数组
K 个不同整数的子数组 给定一个数组 ,如果 中的子数组不同数的个数为 ,则称为一个好数组,统计 中有多少个好数组. 考虑尺取.首先定义一个函数 ,表示 数组中有多少个子数组 ,满足 中不同数的个数小于等于 ,然后答案就是 .算 时,定义一个 数组记录每个数出现的次数,当...
2019-08-06
0
1392
K 连续位的最小翻转次数
K 连续位的最小翻转次数 在仅包含 和 的数组 中,一次 位翻转包括选择一个长度为 的(连续)子数组,同时将子数组中的每个 更改为 ,而每个 更改为 。返回所需的 位翻转的次数,以便数组没有值为 的元素。如果不可能,返回 。 如果最左边的元素是 ,那么我们一定要翻转从位置...
2019-08-06
0
630
1175 E. Minimal Segment Cover
1175 E. Minimal Segment Cover 给你 个区间 ,有 个询问 ,问要覆盖 中所有的点至少需要几个区间.(覆盖的点包括实数点,比如3.5) 倍增写法.首先更新每个区间中左端点 能扩展到的最远 ,然后 ,倍增更新.查找时如果 ,则 ,因为 中 一共有 个点,...
2019-08-06
0
777
1173C - Nauuo and Cards
1173C - Nauuo and Cards 有 张牌,其中有 张时空牌,标号为 ,剩下的 张牌标号在 中。首先给你一个序列 表示手上的牌的标号为 ,一个序列 表示桌上的牌的标号 .每一轮从 中抽出一张牌放在 的尾部,然后 弹出,放在手中,求最小的操作次数使得 序列为 ...
2019-08-06
0
992
Lucas
1. Lucas ll fac[N]; void N_() { fac[0]=1; for(ll i=1;i<N;i++) fac[i]=fac[i-1]*i%mod; } ll quick_mod(ll a,ll b,ll mo){ll ans=1;for(;b;b&...
2019-08-06
0
582
BM
//杜教BM #include<bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #...
2019-08-06
0
791
BSGS&二次剩余
BSGS const int MOD=76543; ll hs[MOD],head[MOD],nxt[MOD],id[MOD],top; void insert(ll x,int y){ ll k=x%MOD; hs[++top]=x,id[top]=y,nxt[...
2019-08-05
0
700
首页
上一页
7
8
9
10
11
12
13
14
15
16
下一页
末页