码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
acwing 291. 蒙德里安的梦想
求把N*M的棋盘分割成若干个1*2的的长方形,有多少种方案。 j表示 n 位二进制数 1 表示有“突出” f[i][j]表示当前状态 f[i-1][k]是上一行的状态 if ((j&k)==0&&st[j|k]) f[i][j]+=f[i-1][k]; #include<bits/stdc++.h> ...
分类:Windows程序   时间:2020-12-31 11:56:31    阅读次数:0
天上掉 Pizza
实在不知道错哪了。。。 对着 std 检查了好几遍了QAQ 题解见注释(不过估计题解也是错的,不然为什么写错啊QAQ #include<bits/stdc++.h> using namespace std; const int N=1<<16; int m,n,a,b; double pr[N],s ...
分类:其他好文   时间:2020-12-24 11:31:40    阅读次数:0
实验二——动态规划·LCS
/*Hatsune Miku 4ever!*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define _for(i,a,b) for(int i = (a);i < b;i ++) #define _r ...
分类:其他好文   时间:2020-12-23 11:47:45    阅读次数:0
实验三——贪心算法&#183;哈夫曼编码
/*Hatsune Miku 4ever!*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define _for(i,a,b) for(int i = (a);i < b;i ++) #define _r ...
分类:编程语言   时间:2020-12-23 11:45:22    阅读次数:0
实验四——回溯法·n皇后
/*Hatsune Miku 4ever!*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define _for(i,a,b) for(int i = (a);i < b;i ++) #define _r ...
分类:其他好文   时间:2020-12-23 11:43:21    阅读次数:0
POJ2 3498
把冰块拆点来保证企鹅起跳的限制,对于所有点为汇点跑一边最大流看看是不是和企鹅人数相等 #include<bits/stdc++.h> #define FT(a,b) memset(a,b,sizeof(a)) using namespace std; const int N = 300 + 10 , ...
分类:其他好文   时间:2020-12-17 12:05:40    阅读次数:3
[Bzoj1767][Ceoi2009]harbingers (树上斜率优化)
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 100005; struct node{ int pre, to, val; }edge[MAXN << 1]; int n, h ...
分类:其他好文   时间:2020-12-16 11:41:51    阅读次数:3
2020团体程序设计天梯赛 补题
L2-1 简单计算器 (25分) 这个题会用栈就能做出来了。按题目要求写就行,比赛没做全对。 #include<bits/stdc++.h>#define ll long longusing namespace std;int main(){ stack<int>s1; stack<char>s2; ...
分类:其他好文   时间:2020-12-11 11:38:53    阅读次数:2
CF884E Binary Matrix(并查集)
初一看,sb题,上去一个并查集,很快啊,返回一个MLE,定睛一看,系统开的内存很小,但是这个算法复杂度又是这么正确 因此考虑优化内存,这样用滚动数组优化即可 #include<bits/stdc++.h> using namespace std; typedef long long ll; type ...
分类:其他好文   时间:2020-12-10 11:39:56    阅读次数:13
2018 ICPC Asia Xuzhou Regional M. Rikka with Illuminations
题意: 一个凸多边形和$m$个光源,问最少选择几个光源使得多边形所有边都被照亮 思路: 对于每个光源,处理出能照到的边,即为区间完全覆盖问题,但是区间是环形的,枚举起点处理 #include <bits/stdc++.h> using namespace std; typedef long long ...
分类:其他好文   时间:2020-12-10 11:38:18    阅读次数:15
3873条   上一页 1 ... 15 16 17 18 19 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!