英语翻译Air RaidTime Limit:1000MS Memory Limit:10000KTotal Submissions:2515 Accepted:1502DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another.It is also known that starting from an in

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 04:37:07
英语翻译Air RaidTime Limit:1000MS Memory Limit:10000KTotal Submissions:2515 Accepted:1502DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another.It is also known that starting from an in

英语翻译Air RaidTime Limit:1000MS Memory Limit:10000KTotal Submissions:2515 Accepted:1502DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another.It is also known that starting from an in
英语翻译
Air Raid
Time Limit:1000MS Memory Limit:10000K
Total Submissions:2515 Accepted:1502
Description
Consider a town where all the streets are one-way and each street leads from one intersection to another.It is also known that starting from an intersection and walking through town's streets you can never reach the same intersection i.e.the town's streets form no cycles.
With these assumptions your task is to write a program that finds the minimum number of paratroopers that can descend on the town and visit all the intersections of this town in such a way that more than one paratrooper visits no intersection.Each paratrooper lands at an intersection and can visit other intersections following the town streets.There are no restrictions about the starting intersection for each paratrooper.
Input
Your program should read sets of data.The first line of the input file contains the number of the data sets.Each data set specifies the structure of a town and has the format:
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 integer no_of_intersections (greater than 0 and less or equal to 120),which is the number of intersections in the town.The second line contains a positive integer no_of_streets,which is the number of streets in the town.The next no_of_streets lines,one for each street in the town,are randomly ordered and represent the town's streets.The line corresponding to street k (k

英语翻译Air RaidTime Limit:1000MS Memory Limit:10000KTotal Submissions:2515 Accepted:1502DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another.It is also known that starting from an in
空袭.
期限:1000MS内存限制:10000K
总递交:2515接受:273
描述,
考虑一个小镇的街道是单向的,每一个十字路口从街道到另一个地方.众所周知,从一个十字路口,走在城里的大街上你永远不能达到同样的路口如下.该镇街道形态没有周期.
你的任务是用这些假设编写一个程序,找到最少量的伞兵,可以在镇上所有的交叉点,参观这座城市以这样一种方式超过一名伞兵访问任何的十字路口.每一名伞兵降落在十字路口后,可以访问其他交叉口的小镇的街道.没有限制的每一位开始路口.
输入,
你的程序应该读数据集.第一行输入文件包含的数据集的数量.每个数据集指定的结构和格式的小镇
no_of_intersections
no_of_streets
S1 E1
中度E2
……
Sno_of_streets Eno_of_streets
第一行的每个数据集包含一个正整数no_of_intersections(大于0和小于或等于120),这是镇上的十字路口.第二行是一个正整数no_of_streets的数量,这是镇上街道.接下来no_of_streets线,每一个城里大街,是随机的命令和代表城镇的街道.对应于大街的< no_of_streets k(k)是由两个正整数,被一个空白:Sk(1)和(2)< = Sk < = no_of_intersections)——那就是交界处的开始的大街上,Ek(1)和(2)< Ek < = no_of_intersections)——交界处的就是这条街的尽头.交叉口为整数1 no_of_intersections.
没有空行连续之间的数据集.输入的数据是正确的.
输出
结果是在标准输出.对每个输入数据集程序打印在一行,开始从一开始的线条,一个整数:最少量的伞兵需要访问所有的交点在城内.
!这就是大致的了!

太多了,看不懂,问更高级的人吧

d

描述
考虑一个小镇,所有的街道是单向的,每个街道领导从一个到另一个十字路口。它也知道,从一开始的路口,穿过城市的大街小巷,你不能达到同样的交集即城市的街头没有形成循环。
有了这些假设你的任务是编写一个程序,发现的最低数目的伞兵,可降落於城市,并参观的所有路口,在这个城市这样的方式不止一个伞兵访问没有交集。每个伞兵土地在一个十字路口,可以访问其它路口后市街。没有限制,对每个路口开始伞...

全部展开

描述
考虑一个小镇,所有的街道是单向的,每个街道领导从一个到另一个十字路口。它也知道,从一开始的路口,穿过城市的大街小巷,你不能达到同样的交集即城市的街头没有形成循环。
有了这些假设你的任务是编写一个程序,发现的最低数目的伞兵,可降落於城市,并参观的所有路口,在这个城市这样的方式不止一个伞兵访问没有交集。每个伞兵土地在一个十字路口,可以访问其它路口后市街。没有限制,对每个路口开始伞兵。
输入
你的程序应改为套数据。第一行输入文件包含数字的数据集。每个数据集的结构指定一个镇和有格式:
no_of_intersections
no_of_streets
中一素E1
中二E2类
......
Sno_of_streets Eno_of_streets
第一行中,每个数据集包含一个正整数no_of_intersections(大於0小於或等於120),这是首要的交点在这个镇。第二行包含一个正整数no_of_streets,这是首要的街道的城市。接下来的no_of_streets线,为每个街道,镇,是随机排序的,代表了城市的街头。该生产线对应街道k(金“= no_of_streets)由两个正整数,隔开一个空白:水库(1”=水库“= no_of_intersections) -有多少交集的是开始在街道和埃切( 1“=埃切”= no_of_intersections) -有多少交集是最终的街道。交点为代表整数1至no_of_intersections。
没有空白行连续集之间的数据。输入数据是正确的。
输出
结果该计划是在标准输出上。对於每个输入数据集的程序打印在一行,开始从一开始的路线,一个整数:最低数量要求的伞兵访问所有的交点在该镇。

收起