#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
#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
#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
#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
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
#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
#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
#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