{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"The Center City fire department collaborates with the transportation department to maintain maps of the city which reflects the current status of the city streets. On any given day, several streets are closed for repairs or construction. Fire fighters need to be able to select routes from the firestations to fires that do not use closed streets.\n\n中心城消防部门与交通部门合作,维护城市地图,反映城市街道的现状。在任何一天,都会有几条街道因维修或施工而关闭。消防员需要能够选择从火场到不使用封闭街道的火灾的路线。\n\n\nCentral City is divided into non-overlapping fire districts, each containing a single firestation. When a fire is reported, a central dispatcher alerts the firestation of the district where the fire is located and gives a list of possible routes from the firestation to the fire. You must write a program that the central dispatcher can use to generate routes from the district firestations to the fires.\n\n中心城市被划分为不重叠的消防区,每个消防区都有一个火场。当接到火灾报告时,中央调度员会向火灾所在区的消防站发出警报,并给出从消防站到火灾的可能路线列表。你必须编写一个程序,让中央调度员可以用来生成从各区消防站到火场的路线。"}},{"title":"Input","value":{"format":"PLAIN","content":"The city has a separate map for each fire district. Streetcorners of each map are identified by positive integers less than 21, with the firestation always on corner #1. The input file contains several test cases representing different fires in different districts.\n\n•The first line of a test case consists of a single integer which is the number of the streetcorner closest to the fire.\n\n•The next several lines consist of pairs of positive integers separated by blanks which are the adjacent streetcorners of open streets. (For example, if the pair 4 7 is on a line in the file, then the street between streetcorners 4 and 7 is open. There are no other streetcorners between 4 and 7 on that section of the street.)\n\n•The final line of each test case consists of a pair of 0\u0027s.\n\n城市有一个单独的地图,每个消防区。每个地图的街角用小于21的正整数来标识,火场总是在1号角。输入文件包含几个测试案例,代表不同地区的不同火灾。\n\n-测试案例的第一行由一个整数组成,这个整数是最接近火灾的街角的编号。\n\n-接下来的几行由一对正整数组成,中间用空格隔开,这对整数是相邻的开放街道的街角。例如,如果文件中的对4 7在一行,那么4号和7号街角之间的街道是开放的。在4和7之间的那段街道上没有其他街角)。)\n\n-每个测试案例的最后一行由一对0组成。\n"}},{"title":"Output","value":{"format":"PLAIN","content":"For each test case, your output must identify the case by number (`CASE 1:\u0027, `CASE 2:\u0027, etc). It must list each route on a separate line, with the streetcorners written in the order in which they appear onthe route. And it must give the total number routes from restation to the re.Include only routeswhich do not pass through any streetcorner more than once.(For obvious reasons, the firedepartment doesn\u0027t want its trucks driving around in circles.)\n\nOutput from separate cases must appear on separate lines.\n\n对于每个测试用例,你的输出必须用编号来标识用例(`CASE 1:\u0027,`CASE 2:\u0027等)。它必须在单独的一行中列出每条路由,并按照路由上出现的顺序写出街角。只包括不经过任何街角一次以上的路线(出于明显的原因,消防部门不希望它的卡车绕圈行驶)。\n\n不同案例的输出必须在不同的行中显示。\n"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"6\n1 2\n1 3\n3 4\n3 5\n4 6\n5 6\n2 3\n2 4\n0 0\n4\n2 3\n3 4\n5 1\n1 6\n7 8\n8 9\n2 5\n5 7\n3 1\n1 8\n4 6\n6 9\n0 0\n"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"CASE 1:\n1 2 3 4 6\n1 2 3 5 6\n1 2 4 3 5 6\n1 2 4 6\n1 3 2 4 6\n1 3 4 6\n1 3 5 6\nThere are 7 routes from the firestation to streetcorner 6.\nCASE 2:\n1 3 2 5 7 8 9 6 4\n1 3 4\n1 5 2 3 4\n1 5 7 8 9 6 4\n1 6 4\n1 6 9 8 7 5 2 3 4\n1 8 7 5 2 3 41 8 9 6 4\nThere are 8 routes from the firestation to streetcorner 4."}}]}