码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
挑战程序设计竞赛2.3习题:Cow Exhibition POJ - 2184
"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
Highways POJ - 1751
#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
Constructing Roads POJ - 2421 最小生成树板子题
#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
算分-DESIGN THECHNIQUES
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
QS Network ZOJ - 1586 板子题
#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
Building a Space Station POJ - 2031 三维最小生成树,其实就是板子题
#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
Networking POJ - 1287 最小生成树板子题
#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
c++中的排序函数
#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
POJ 2253 Frogger
#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
Heavy Transportation POJ - 1797
#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
共11758条   上一页 1 ... 96 97 98 99 100 ... 1176 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!