合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

        代寫ECE 36800、代做Java/Python語言編程
        代寫ECE 36800、代做Java/Python語言編程

        時間:2024-11-25  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



        ECE 36800 Assignment #8 
         
         Original Due: 1:00 PM, Tuesday, November 19 
         Extended: 1:00 PM, Tuesday, November 26 
         
        Goal 
        Consider the following scenario: you want to find an optimal route for your commute to work 
        while considering factors like traffic, which may change over time. We can model this as a graph 
        where each edge has a list of weights, such that each element of the list reflects the weight of that 
        edge after a certain number of steps. For instance, consider the path given by 0 → 1 → 2 → 0 on 
        the graph below: 
        The weight of the 0 → 1 edge is initially 1. After taking the first step, the weight of the 1 → 
        2 edge is 5, and after the second step, the weight of the 2 → 0 edge is 9, so the total weight of the 
        path is 1 + 5 + 9 = 15. 
        For simplicity, we only consider graphs where the lists of weights for each edge all have the same 
        length, called the period. In general, if an edge u → v shows up at position i in the path and has a 
        weight list of (x1, . . . , xn), it contributes xi mod n to the weight of that path. The goal of this 
        assignment is to write a program which, given a graph like the one above, and a pair of start/end 
        vertices, outputs a path from start to end with minimum weight. 
         
        Input/Output 
        As before, your program should take as a command-line argument the name of a text file 
        describing a graph, and then respond to queries on standard input. For each query, you should 
        print to standard output the shortest path as a space-separated list of vertices. 
        The format of the text file is as follows: 
        • The first line will look like V N , where V is the number of vertices in the graph, and 
        N is the period of the edge weights. 
        • Following that, there will be one line per edge, in the format 
        vs vt w1 . . . wN 
        where vs is an integer representing the source vertex of the edge, vt is an integer 
        representing the target vertex of the edge, and each of w1 through wN are integers 
        representing the list of weights for that edge. 
        Each query will be given by a space-separated pair of integers, representing the indices of the start 
        and end vertices, respectively.  
         
        © 2024, Jongwook Kim. All rights reserved. 
         
        Example 
        Consider the following graph.txt file: 

        This represents the graph: 

        A sample run of the program is shown below: 
        $ ./a8 graph.txt 

        where 0 3 is the query input on stdin and 0 1 2 3 is the shortest path. Explanation: the shortest 
        path from 0 to 3 is 0 → 1 → 2 → 3 with a total weight of 5 + 2 + 4 = 11, since the 
        other path 0 → 2 → 3 has a total weight of 3 + 15 = 18. 
        There will be multiple queries for each graph, but you may assume that all queries with the same 
        start vertex will be given consecutively. 
         
        Grading 
        Similar to the previous programming assignment, your submission must be both correct and 
        efficient (and not have any memory leaks/errors, as usual) to receive full points. The graphs will 
        range in size from 10 vertices to roughly 1k vertices, and each graph will have approximately 10 
        queries. For each test case, your program must produce an output within the time limit to receive 
        credit. You should put a comment at the start of each method describing its functionality. 
         
        Submission 
        Submit any source/header files with your implementation, as well as a Makefile that builds 
        a target called a8, to Gradescope. DO NOT include executables in your submission. DO NOT 
        put your files inside a folder. Note that to receive points, your submission must work on 
        eceprog. 
        4,15 

        請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






         

        掃一掃在手機打開當前頁
      1. 上一篇:代寫ENG4200、Python/Java程序設計代做
      2. 下一篇:代寫MATH38161、代做R程序設計
      3. 無相關信息
        合肥生活資訊

        合肥圖文信息
        出評 開團工具
        出評 開團工具
        挖掘機濾芯提升發動機性能
        挖掘機濾芯提升發動機性能
        戴納斯帝壁掛爐全國售后服務電話24小時官網400(全國服務熱線)
        戴納斯帝壁掛爐全國售后服務電話24小時官網
        菲斯曼壁掛爐全國統一400售后維修服務電話24小時服務熱線
        菲斯曼壁掛爐全國統一400售后維修服務電話2
        美的熱水器售后服務技術咨詢電話全國24小時客服熱線
        美的熱水器售后服務技術咨詢電話全國24小時
        海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
        海信羅馬假日洗衣機亮相AWE 復古美學與現代
        合肥機場巴士4號線
        合肥機場巴士4號線
        合肥機場巴士3號線
        合肥機場巴士3號線
      4. 上海廠房出租 短信驗證碼 酒店vi設計

        主站蜘蛛池模板: 国产另类TS人妖一区二区 | 久久久国产精品一区二区18禁 | 一区二区免费视频| 亚洲av日韩综合一区二区三区| 亚洲一区免费观看| 精品无码一区二区三区亚洲桃色| 精品性影院一区二区三区内射 | 国产精品无码AV一区二区三区| 国产精品特级毛片一区二区三区 | 国产亚洲情侣一区二区无| 无码人妻精品一区二区蜜桃网站 | 亚洲人成网站18禁止一区 | 亚洲AV无一区二区三区久久| 国产高清在线精品一区小说 | 亚洲一区二区久久| 国产成人无码精品一区二区三区| 国产精品视频一区二区三区不卡| 日韩一区二区三区电影在线观看| 精品一区二区三人妻视频 | 亚洲不卡av不卡一区二区| 日产一区日产2区| 久久国产高清一区二区三区| 国产精品一区二区三区99| 久久精品一区二区三区中文字幕 | 无码精品视频一区二区三区 | 国产成人av一区二区三区在线观看 | 黑巨人与欧美精品一区| 成人丝袜激情一区二区| 亚洲国产AV无码一区二区三区| 亚洲日本va一区二区三区| 亚洲AV无码一区二区三区鸳鸯影院 | 中文字幕一区二区三| 国产一区二区三区在线影院| 日本一区二区不卡在线| 男女久久久国产一区二区三区| 亚洲一区二区三区夜色| 无码av人妻一区二区三区四区| 国产精品一区二区久久| 99偷拍视频精品一区二区| 国产免费一区二区三区VR| 国产韩国精品一区二区三区|