码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
二分图板子
二分图最大匹配: 匈牙利算法 邻接表O(mn): #pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; const int maxn = 1010; const int maxm = 2e5; int n, m, ...
分类:其他好文   时间:2020-07-14 21:42:51    阅读次数:67
P2089 烤鸡
https://www.luogu.com.cn/problem/P2089 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, cnt=0, ans[60000][10];//最多情况是3^10= 59049,所以开这么大二维数组,用 ...
分类:其他好文   时间:2020-07-14 15:05:48    阅读次数:388
Educational Codeforces Round 91 (Rated for Div. 2) C. Create The Teams
题目链接:https://codeforces.com/contest/1380/problem/C 题意 给 $n$ 个数分组,要求每组的最小值乘以该组数的个数不小于 $x$ 。 题解 从大到小依次分即可。 代码 #include <bits/stdc++.h> using ll = long l ...
分类:其他好文   时间:2020-07-14 00:45:36    阅读次数:83
P1059 明明的随机数
#include<bits/stdc++.h> using namespace std; int a[105]= {0}; int b[105]; int pd(int q,int l) { int i; for(i=0; i<l; i++) { if(b[i]==q) { return 0; } ...
分类:其他好文   时间:2020-07-13 23:05:26    阅读次数:107
Cover the Tree
Cover the Tree 就当作是一个结论吧…当要用链覆盖所有的边时,对叶子节点根据dfs序排序后,根据$(i,i+s/2)$的配对规则进行配对即可,如果有奇数个叶子节点,则将其与根节点相连。 // Created by CAD on 2020/7/13. #include <bits/stdc ...
分类:其他好文   时间:2020-07-13 21:24:10    阅读次数:94
【刷题-LeetCode】190 Reverse Bits
Reverse Bits Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 0011100101111000001010010100 ...
分类:其他好文   时间:2020-07-13 11:35:53    阅读次数:58
P2657 [SCOI2009] windy 数
数位dp模板题 #include <bits/stdc++.h> #define inf 2333333333333333 #define N 1000010 #define p(a) putchar(a) #define For(i,a,b) for(int i=a;i<=b;++i) //by ...
分类:Windows程序   时间:2020-07-13 11:32:27    阅读次数:81
0190. Reverse Bits (E)
Reverse Bits (E) 题目 Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 001110010111100000101 ...
分类:其他好文   时间:2020-07-13 09:14:55    阅读次数:56
20/07/12测试
#T1 搜索 和以前做过一道关于排序的题有亿点点像,看到这么小的数据范围竟然脑抽没去想搜索.... #T2 筛法 换个方向思考,我们考虑这个数是几个数的倍数 #include <bits/stdc++.h> using namespace std; const int maxn = 1000000+ ...
分类:其他好文   时间:2020-07-12 22:15:34    阅读次数:66
Kick Start Round D 2020(前两题)
https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ff08?scoreboard_type=China A.当前数比前面所有和后面一个都大的时候,算做破纪录一次。遍历一遍。 #include <bits/std ...
分类:其他好文   时间:2020-07-12 16:25:30    阅读次数:65
3873条   上一页 1 ... 35 36 37 38 39 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!