码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
P1024 一元三次方程求解
采用分治思想 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; double a,b,c,d; double f(double x) { return ...
分类:其他好文   时间:2020-07-17 13:39:43    阅读次数:71
LuoguP4279 [SHOI2008]小约翰的游戏
LuoguP4279 [SHOI2008]小约翰的游戏 题目描述 链接 Solution Anti-SG的模板题 这里就直接放代码 #include<bits/stdc++.h> using namespace std; inline long long read() { long long f = ...
分类:其他好文   时间:2020-07-16 21:44:29    阅读次数:72
pat 1104 Sum of Number Segments (20分) 测试点3需要long double
题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805363914686464 模拟题,新改的测试数据需要long double型,如果测试点3无法通过,可以参考以下代码: #include<bits/stdc++ ...
分类:其他好文   时间:2020-07-16 12:08:19    阅读次数:60
477. Total Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total ...
分类:其他好文   时间:2020-07-16 12:06:09    阅读次数:75
CodeForces - 438D(线段树+剪枝)
1.区间求和 2.区间取模 3.单点修改 线段树,区间取模加一个剪枝:区间最大值<mod,不修改。其他单点取模 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long l ...
分类:其他好文   时间:2020-07-16 11:50:06    阅读次数:63
HDU - 4027(线段树+剪枝)
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:其他好文   时间:2020-07-16 10:11:53    阅读次数:74
loj536「LibreOJ Round #6」花札(二分图博弈)
loj536「LibreOJ Round #6」花札(二分图博弈) loj 题解时间 很明显是二分图博弈。 以某个点为起点,先手必胜的充要条件是起点一定在最大匹配中。 判断方法是看起点到该点的边有流量且该点不在起点割集中。 #include<bits/stdc++.h> using namespac ...
分类:其他好文   时间:2020-07-15 23:11:15    阅读次数:70
P1036 选数
https://www.luogu.com.cn/problem/P1036 方法二:二进制枚举+素数筛 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a[25]; 4 const int max_n=10000005; 5 int b ...
分类:其他好文   时间:2020-07-15 01:26:17    阅读次数:76
逆序对
逆序对目前我所知的有三种解法 首先是最简单的冒泡排序,当每次前面一个数比后面一个数大时就会交换,因此可以用冒泡排序来求逆序对 代码: #include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; int a ...
分类:其他好文   时间:2020-07-14 21:51:19    阅读次数:65
链式前向星
该算法学习来自 b站 示例代码 1 输出的访问顺序与输入相反 #include <bits/stdc++.h> #define LL long long #define Pi acos(-1.0) #define INF 2147483646 #define eps 1e-9 #define MS ...
分类:其他好文   时间:2020-07-14 21:49:52    阅读次数:72
3873条   上一页 1 ... 34 35 36 37 38 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!