"Fat and docile, big and dumb, they look so stupid, they aren't muchfun..."- Cows with Guns by Dana LyonsThe cows want to prove to the public that the ...
分类:
其他好文 时间:
2020-01-29 15:55:06
阅读次数:
107
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; const int maxn=800; int n,m,tot,u,v; int pre[maxn]; //存点 ...
分类:
其他好文 时间:
2020-01-29 15:48:00
阅读次数:
51
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=110; int p[N]; struct edge{ int a; int b; int w; }e[N*N]; in ...
分类:
其他好文 时间:
2020-01-29 14:22:30
阅读次数:
62
Divide-and-Conquer: 教材中是用快排作为例子介绍分治算法的,主要的是几个式子: 最坏情况下的快排:T(n) = n + T(n-1) 最好情况下的快排:T(n) = n + 2*T((n-1) / 2) 随机情况下的快排:T(n) = n + 1/n * sum(T(i) + T( ...
分类:
其他好文 时间:
2020-01-29 14:19:10
阅读次数:
79
#include<iostream> #include<algorithm> using namespace std; const int N=1e6+10; struct edge{ int a,b; double w; }e[N]; int p[N]; int a[N]; int n; bool ...
分类:
Web程序 时间:
2020-01-29 14:15:19
阅读次数:
66
#include<iostream> #include<cmath> #include<algorithm> #include<cstdio> using namespace std; const int N=1e5; struct edge{ int a,b; double w; }e[N]; d ...
分类:
其他好文 时间:
2020-01-29 14:01:16
阅读次数:
89
#include<iostream> #include<algorithm> using namespace std; const int N=1e5; struct edge{ int a,b,w; }e[N]; bool cmp(edge a,edge b) { return a.w<b.w; ...
分类:
Web程序 时间:
2020-01-29 12:50:21
阅读次数:
89
#include <iostream> #include <algorithm>//直接用相应的库进行排序,简化算法,加快相应速度 using namespace std; int main() { int a[7]={-2,3,4,1,9,0,7}; sort(a,a+7);//排序函数的用法 f ...
分类:
编程语言 时间:
2020-01-29 12:46:22
阅读次数:
70
#include<math.h> #include<iomanip> //setprecision头文件 #include<stdio.h> #include<iostream> #include<algorithm> #include<string.h> #include<queue> using ...
分类:
其他好文 时间:
2020-01-29 12:15:57
阅读次数:
51
#include<iostream> #include<algorithm> #include<queue> #include<map> #include<cstring> #include<cstring> #include<cstdio> #include<math.h> using names ...
分类:
其他好文 时间:
2020-01-29 12:15:38
阅读次数:
71