曾在气院呆过
Input must be read with scanf(). The input will contain only what is described here.The input will start with a line containing one integer specifying the number of vertices. This will be followed by the data specifying the outgoing edges from each vertex, (first the data about the outgoing edges from vertex 0, then the data about the outgoing edges from vertex 1, etc.). The data for each vertex will consist of a line containing an integer specifying the number of outgoing edges, followed by a series of lines, one for each outgoing edge from the vertex, each such line containing an integer specifying the vertex to which the edge goes, a space, and an integer specifying the weight of the edge. The outgoing edges of a vertex will be in ascending order of "to" vertex. The last line of the input will be an integer specifying the vertex from which the search must start.(The input1 file in the assignment2 directory specifies a problem using the graph from the relevant weekly work, replacing vertex label a by 0, vertex label b by 1, etc.)The output must be produced with printf(). The output must contain only what is described here.The output must be (only) the lengths of the shortest path distances, (starting with the distance 0 for the start vertex) in non-descending order of shortest path distance, each as would be produced by:printf("%d\n", distance[i]);where distance[i] is the relevant distance.(The output1 file is the output file for input1.)
璐璐308738
不翻译了,我就按样例解释下吧。7 顶点的数量1 顶点的0 的出度数2 3 与顶点0相连顶点2 权为32 顶点的1 的出度数0 5 与顶点1相连顶点0 权为53 3 与顶点1相连顶点3 权为30 顶点的2 的出度数 后面类推。。。。。12 86 最后一行一个数 查找的起始点 输入必须用scanf()函数读取 输入内容描述如下:输入以一个指定的顶点数量整数占据一行开始 , 接下来的数据将指明每个顶点的流出边(从0开始递加) 每个顶点的这组数据的第一行是流出边的数量,接下来有相应的行数,每行有两个整数分别表示另一个顶点和该流出边的权值,中间用一个空格隔开。另外那另一顶点也是升序出现。最后一行是查找开始的顶点。(在任务2目录中的input1输入文件中指定了问题使用的来自与每周工作相关的图,将其中的a用0替换,b用1替换,以此类推。。。)输出必须用printf程序,输出内容描述如下:输出必须是最短路径长度以升序的方式(对于起始点的长度用0)例如程序可用printf( “%d\n”,distance[i] ) ; distance[i]是相关点的最短路径长(output1 文件是input1 的输出)
343004227qq
这次,要求你找到 A+B,A,B为多项式输入: 每个输入文件包含一个测试用例。每个测试用例占两行,每行包含一个多项式的信息,K N1 aN1 N2 aN2 ... Nk aNk,K表示多项式中一段非零的项目,Ni 和 aNi表示 相对应的指数和系数。假设 1 <= K <= 10, 0 <= NK < ... < N2 < N1 <=1000.输出:对于每一格测试用例,你应该在一行中输出A和B的总和,输出格式要与输入格式一样。注意每一行的结尾不能有 多余的空格。输出精度控制在小数点后一位例如输入2 1 2.4 0 3.22 2 1.5 1 0.5输出例子 :3 2 1.5 1 2.9 0 3.2
看i哦飞机
输入必须读scanf()。输入将只包含此处描述的是什么。输入将开始使用一个行包含一个整数指定数量的顶点。这将之后的数据指定出边从每个顶点,(第一个资料出边从顶点0,那么即将离任的边缘的数据从顶点1,等等)。数据对于每个顶点将包括一行包含一个整数指定数量的即将离任的边缘,紧随其后的是一系列的直线的,每一个即将离任的优势从顶点,每个这样的行包含一个整数指定顶点,边走,一个空间,和一个整数指定边缘的重量。即将离任的边的顶点将按升序的”到“顶点。这个最后一行输入将被一个整数指定顶点的搜索必须开始。(input1文件中指定了一个问题assignment2目录使用图有关每周的工作,取代顶点标注一个由0,顶点标签由1 b,等等)。产生的输出必须用printf()。输出必须只包含此处描述的是什么。输出必须(只有)的长度最短路径的距离,(从距离为0在non-descending开始顶点)订单的最短路径距离,皆会产生的:printf(" % d \ n”,距离[我]);在距离[i]是相关的距离。(output1文件的输出文件input1。希望能帮到你!