码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
Luogu P2825 [HEOI2016/TJOI2016]游戏
题链 分析 如果没有硬石头,显然裸的二分图匹配 加上硬石子,相当于分段后跑二分图匹配即可 #include<bits/stdc++.h> #define pb push_back using namespace std; const int N=105,M=10005; int n,m,id1[N] ...
分类:其他好文   时间:2021-06-20 17:41:41    阅读次数:0
Codeforces Round #726 (Div. 2)
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define all(x) x.begin(),x.end() #define pb(x) push_back(x) #def ...
分类:其他好文   时间:2021-06-19 19:16:51    阅读次数:0
空间四点体积
https://ac.nowcoder.com/acm/contest/11212/E #include<bits/stdc++.h> using namespace std; // define a point class to store a point class Point { public ...
分类:其他好文   时间:2021-06-19 18:50:57    阅读次数:0
高级数据结构第六章E . 苹果树 (dfs+树状数组)
link #思路: 经典套路,通过dfs序将树上修改转化为线性修改,这样问题就转化为了单点修改,区间查询,用树状数组维护。 类似题 #代码: #pragma GCC optimize(2) #include<bits/stdc++.h> using namespace std; typedef lo ...
分类:移动开发   时间:2021-06-15 17:41:05    阅读次数:0
[Trie树]C. 【例题3】最长异或路径
解析 这道题我觉得恶心的地方就是要求一整条边的边权的异或给搞出来, 注意运算符不要用错了。 Code #include <bits/stdc++.h> #define N 100005 using namespace std; struct node { int x, to, nxt; }hd[N ...
分类:其他好文   时间:2021-06-13 10:42:08    阅读次数:0
AT4119 [ARC096C] Everything on It
题链 分析 显然容斥 考虑有i个有1个或者有0个的情况放到j个非空集合中的方案 可以发现0很麻烦,所以不妨把0的放到一个垃圾集合中,然后把向垃圾集合中加0表示是垃圾集合 问题变成了i+1个数放到j+1个非空集合的方案,即为第二类斯特林数 统计即可 #include<bits/stdc++.h> #d ...
分类:其他好文   时间:2021-06-10 18:07:02    阅读次数:0
P1590 失踪的7
这么简洁的题目当然不用数位 DP 啦。 将 \(n\) 搞成 \(10\) 的幂次之和计算。枚举后缀长度 \(i\),考虑它的贡献,因为不能填 \(7\) 也不用考虑前导零所以就是 \(9^i\)。 然后乘上 \(n-i\) 位置上的数字能取到的数量即可。 code: #include<bits/s ...
分类:其他好文   时间:2021-06-06 19:26:26    阅读次数:0
SYCOJ#1077、01字符串
题目—01字符串 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 6 string a="0"; 7 int n; 8 cin>>n; 9 string ans=""; 10 if ...
分类:其他好文   时间:2021-06-06 19:01:00    阅读次数:0
SYCOJ#111、吉祥物
题目—吉祥物 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,x; 4 int pos(int n) 5 { 6 int s=1,j=1; 7 while(s<n) 8 { 9 s+=j++; 10 } ...
分类:其他好文   时间:2021-06-06 18:58:39    阅读次数:0
K次圆覆盖问题
K次圆覆盖问题 模板 #include<bits/stdc++.h> using namespace std; const int maxn=1009; const double eps=1e-8; const double pi=acos(-1); int dcmp(double x) {retu ...
分类:其他好文   时间:2021-06-04 19:11:31    阅读次数:0
3873条   上一页 1 2 3 4 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!