ACM: 图论题 poj 1…
来源:互联网 发布:java酒店管理系统程序 编辑:程序博客网 时间:2024/05/17 19:16
With these assumptions your task is to write a program that findsthe minimum number of paratroopers that can descend on the town andvisit all the intersections of this town in such a way that morethan one paratrooper visits no intersection. Each paratrooper landsat an intersection and can visit other intersections following thetown streets. There are no restrictions about the startingintersection for each paratrooper.
Input
no_of_intersections
no_of_streets
S1 E1
S2 E2
......
Sno_of_streets Eno_of_streets
The first line of each data set contains a positive integerno_of_intersections (greater than 0 and less or equal to 120),which is the number of intersections in the town. The second linecontains a positive integer no_of_streets, which is the number ofstreets in the town. The next no_of_streets lines, one for eachstreet in the town, are randomly ordered and represent the town'sstreets. The line corresponding to street k (k <=no_of_streets) consists of two positive integers, separated by oneblank: Sk (1 <= Sk <=no_of_intersections) - the number of the intersection that is thestart of the street, and Ek (1 <= Ek<= no_of_intersections) - the number of theintersection that is the end of the street. Intersections arerepresented by integers from 1 to no_of_intersections.
There are no blank lines between consecutive sets of data. Inputdata are correct.
Output
Sample Input
2
4
3
3 4
1 3
2 3
3
3
1 3
1 2
2 3
Sample Output
2
1
题意: 进行空袭, 要求用最少的伞兵, 可以走完全部的点.
解题思路: (简单题)
代码:
#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
#define MAX 128
int n, m;
int g[MAX][MAX];
int y[MAX];
bool vis[MAX];
bool find(int u)
{
}
int Edmonds()
{
}
int main()
{
//
}
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 3…
- ACM: 图论题 poj 2240 (floyd + ST…
- ACM: 简单最小生成树 图论题 poj 1…
- ACM: 匈牙利算法 图论题 poj 3041 …
- ACM: 差分约束 图论题 poj 2983 sp…
- ACM: 有向欧拉图 图论题 poj 1386 …
- ACM: 图论题 poj 2253 (poj上的dou…
- ACM: 图论题 poj 1135
- ACM: 二分图最佳匹配 图论题 poj 3…
- ACM: 二分图最大匹配 图论题 poj 2…
- ACM: 图论题 poj 1161 (把图重建成…
- ACM: 图论题 poj 1789 (一次AC的水…
- ACM: 图论题 poj 1125 (题意读好久…
- ACM: 图论题 poj 1062 (邻接矩阵+d…
- ACM: 最小费用最大流 图论题 poj 2…
- ACM: 图论题+记忆DP poj 2662 (边…
- ACM: 图论题 poj 1201 差分约束
- ACM: 图论题 poj 1149 网络流问题
- ACM: 图论题 poj 1236 强连通
- ACM: 图论题 poj 1275 差分约束题
- 图论: 差分约束系统
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 1466 最大独立团
- ACM: 图论题 poj 1…
- ACM: 动态规划题 sicily…
- ACM: 动态规划题 《黑书…
- CSDN博客关注点
- ACM: 动态规划题 poj&nb…
- ACM: 金华赛区题目 水题…
- ACM: 华东师范oj 1600&n…