码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
Jungle Roads POJ - 1251 模板题
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=0x3f3f3f3f; int p[50]; struct edge{ int a,b,w; }e[100]; bool ...
分类:其他好文   时间:2020-01-29 12:11:08    阅读次数:72
查找算法总结
1.顺序查找(线性查找) 顺序查找(Sequential Search)又叫线性查找,是最基本的查找技术。它的查找过程为:从表中第一个(或最后一个)记录开始,逐个进行记录的关键字和给定值比较,如果某个记录的关键字和给定值相等,则查找成功,找到所查的记录。如果直到最后一个(或第一个)记录,其关键字和给 ...
分类:编程语言   时间:2020-01-28 23:14:41    阅读次数:111
混合背包
1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 int m,n,w[31],c[31],p[31],f[201]; 5 int main(){ 6 cin>>m>>n; 7 for(int i=1;i<=n;i+ ...
分类:其他好文   时间:2020-01-28 21:32:34    阅读次数:58
Milking Time POJ - 3616 dp 感觉像背包
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; const int N=1010; struct edge{ int start; int end; int ...
分类:其他好文   时间:2020-01-28 20:59:13    阅读次数:78
Common Subsequence POJ - 1458 最长公共子序列 线性DP
#include <iostream> #include <algorithm> #include <string> #include <cstring> #include <cstdio> #define MAX 1005 using namespace std; int ans[MAX][MAX ...
分类:其他好文   时间:2020-01-28 19:21:43    阅读次数:85
Help Jimmy POJ - 1661 dp
#include<iostream> #include<stdio.h> #include<algorithm> #include<cstring> using namespace std; const int N=1010; const int M=20010; const int INF=0x3 ...
分类:其他好文   时间:2020-01-28 18:58:25    阅读次数:76
240. Search a 2D Matrix II
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i ...
分类:其他好文   时间:2020-01-28 17:32:43    阅读次数:88
FatMouse's Speed HDU - 1160 最长上升序列,
#include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; struct node { int w, s; int index; //储存标号 } mouse[1005]; ...
分类:其他好文   时间:2020-01-28 17:24:42    阅读次数:90
Monkey and Banana HDU - 1069 有点像背包,又像最长上升序列
#include<iostream> #include<algorithm> #include<cstring> #include<vector> using namespace std; const int INF=0x3f3f3f3f; struct node{ int l,s,h; }; ve ...
分类:其他好文   时间:2020-01-28 15:50:15    阅读次数:83
Ignatius and the Princess IV HDU - 1029 基础dp
#include<iostream> #include<cstring> #include<cmath> #include<cstdio> #include<algorithm> #include<stack> #include<queue> using namespace std; const i ...
分类:其他好文   时间:2020-01-28 15:34:42    阅读次数:71
共11758条   上一页 1 ... 97 98 99 100 101 ... 1176 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!