码迷,mamicode.com
首页 >  
搜索关键字:using 127.0.0.1 for servername    ( 53996个结果
跟多项式运算相关代码
共轭优化 FFT,P3803 多项式乘法 NTT,P3803 多项式乘法 #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; typedef double db; #d ...
分类:其他好文   时间:2021-02-18 13:16:23    阅读次数:0
高斯消元解线性方程组(高斯消元,模板)
题意 给定$n \times (n + 1)$的线性方程组的增广矩阵,求方程的解。 代码 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using name ...
分类:其他好文   时间:2021-02-18 13:16:05    阅读次数:0
01背包三种方法
通用 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #define maxn 1100 using namespace std; //dp[i][j] 表示从第i个 ...
分类:其他好文   时间:2021-02-18 13:00:57    阅读次数:0
AcWing 1381. 阶乘
N 的阶乘(记作 N!)是指从 1 到 N(包括 1 和 N)的所有整数的乘积。 阶乘运算的结果往往都非常的大。 现在,给定数字 N,请你求出 N! 的最右边的非零数字是多少。 例如 \(5!=1×2×3×4×5=120\),所以 5! 的最右边的非零数字是 2。 输入格式 共一行,包含一个整数 \ ...
分类:Windows程序   时间:2021-02-17 15:05:20    阅读次数: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
最小生成树 : 拆点
https://www.acwing.com/problem/content/1145/ 思路 \(把已有的边加上,会形成各个连通块,等价于把每个连通块当成一个点去做Kruskal算法.\) #include <bits/stdc++.h> using namespace std; #define ...
分类:其他好文   时间:2021-02-17 14:56:41    阅读次数:0
高斯消元
高斯消元解线性方程组 时间复杂度:O(\(n^3\)) https://www.luogu.com.cn/problem/P3389 题意:给定一个线性方程组,对其求解。 #include <bits/stdc++.h> using namespace std; const char nl = '\ ...
分类:其他好文   时间:2021-02-17 14:54:53    阅读次数:0
组合数学
组合数学 方法一:预处理 + 递推 \(C_a^b = C_{a-1}^b + C_{a-1}^{b-1}\) 时间复杂度:O(\(n^2\)) #include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; const ...
分类:其他好文   时间:2021-02-17 14:54:06    阅读次数:0
【补题】Codeforces Round #700 (Div. 2) C. Searching Local Minimum
题目链接:https://codeforces.com/contest/1480/problem/C 题解: 二分法。设定查找区间为$[1,n]$。若$a_<a_{mid+1}$若$a_>a_$,则$a_$为可行解。若$a_<a_$同理可得除非$a_n$在区间$[l,mid]$严格单调增加,否则必有 ...
分类:其他好文   时间:2021-02-17 14:36:41    阅读次数:0
53996条   上一页 1 ... 38 39 40 41 42 ... 5400 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!