http://poj.org/problem?id=2253】的更多相关文章

floyd的应用求每条路径两点之间最大距离的最小值 #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> using namespace std; int a[205],b[205],d[205][205]; int main(int argc, char *argv[]) { int n,i,j,k,m=0; while(cin>>n&&a…
  http://poj.org/problem?id=1651Multiplication Puzzle   Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6188   Accepted: 3777 Description The multiplication puzzle is played with a row of cards, each containing a single positive integer.…
http://poj.org/problem?id=3056 The Bavarian Beer Party Time Limit: 6000MS   Memory Limit: 65536K Total Submissions: 995   Accepted: 359 Description The professors of the Bayerische Mathematiker Verein have their annual party in the local Biergarten.…
http://poj.org/problem?id=1679 The Unique MST Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23339   Accepted: 8284 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree…
http://poj.org/problem?id=3278 题目大意: m,n两个数m可+1, -1, *2变成n,需要经过几步 #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<queue> #define max(a, b)(a > b ? a : b) #define N 100010 using namespace s…
#include <iostream>// poj 1258 10.1.5.253 1505 using namespace std; #define N 105 // 顶点的最大个数 (多写 int a[N][N],low[N],n,ans; int min(int x,int y) { return x<y?x:y; } void prim(int u0) { int i,j,m,k; ans=0; // for (i=1;i<n;i++) low[i]=a[u0][i]; /…
Catch That Cow Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 76935   Accepted: 24323 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,00…
/**< */#include <stdio.h> #include <string.h> #include <stdlib.h> #include <queue> #include <ctype.h> #define N 310 using namespace std; ][] = {{-, -}, {-, }, {-, -}, {-, }, {, -}, {, }, {, -}, {, }}; int vis[N][N], l, ex,…
Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along the way. She has decided to take the second-shorte…
题目链接 #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<string> using namespace std; ; typedef long long int LL; LL sum[N << ]; LL add[N << ]; struct node { int…