码迷,mamicode.com
首页 >  
搜索关键字:reverse bits    ( 8842个结果
E. Cheap Dinner from Educational Codeforces Round 104 (Rated for Div. 2)
题意:有4种菜,每种菜有n1,n2,n3,n4个,每个菜有一个价格。 需要你每种菜选1个,问最小价格。但1和2、2和3、3和4之间有些菜有1对1的互斥关系,如果有互斥则不能选。 做法:把每两组贪心线性预处理,最后合并即可 #include<bits/stdc++.h> using namespace ...
分类:其他好文   时间:2021-02-23 14:09:14    阅读次数:0
边连通分量
冗余路径 \(\href{https://www.acwing.com/solution/content/20697/}{边连通分量}\) \(本题是等价于加入最少边是整个图变成边连通分量(没有桥)\) #include <bits/stdc++.h> using namespace std; #d ...
分类:其他好文   时间:2021-02-22 12:51:09    阅读次数:0
[CF1398C] Good Subarrays
[CF1398C] Good Subarrays Description 求子串中所有元素的和等于它的长度的子串的数量 Solution 前缀和一下,即 s(r)-s(l)=r-l, s(r)-r=s(l)-l 所以统计出 s(i)-i=k 的数量,然后算答案即可 #include <bits/st ...
分类:其他好文   时间:2021-02-22 12:50:38    阅读次数:0
【WZOI 21/239】 Picks loves segment tree
题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> #pragma GCC optimize(2 ...
分类:其他好文   时间:2021-02-22 12:36:23    阅读次数:0
ABC 192 题解
A 模拟 B 模拟 C 模拟 #include<bits/stdc++.h> using namespace std; #define SET0(a) memset(a,0,sizeof(a)) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ...
分类:其他好文   时间:2021-02-22 12:10:05    阅读次数:0
CCF 201809-1 卖菜
#include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; int main() { int n; cin>>n; vector<int> a; for(int i=0;i<n;i++) { ...
分类:其他好文   时间:2021-02-19 13:54:37    阅读次数:0
基本的git/linux/g++/ 等指令
0 引言 本文将常用的指令记录下来,以备查询。 1 git Command Meaning Reference Linking git status view all files' state, tracked or untracked, commited or un commited git st ...
分类:系统相关   时间:2021-02-19 13:10:17    阅读次数:0
树套树(splay套线段树) -AcWing 2476
树套树(splay套线段树) -AcWing 2476 本来想着用multiset套线段树的,结果一直T。改成常数小的splay才过,写完人都傻了^^ /* splay套线段树 */ #include <bits/stdc++.h> using namespace std; const int N ...
分类:Windows程序   时间:2021-02-18 13:37:49    阅读次数:0
最小生成树 : Kruskal
https://www.acwing.com/problem/content/1143/ \(裸题\) #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); c ...
分类:其他好文   时间:2021-02-17 14:58:39    阅读次数:0
最小生成树 : 最大边
https://www.acwing.com/problem/content/1144/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-17 14:57:50    阅读次数:0
8842条   上一页 1 ... 14 15 16 17 18 ... 885 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!