CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - B-ISDN
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - B-ISDN - List
[
VC/MFC
]
CPP
DL : 0
1,最短路径问题: 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 输入: 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t 起点s,终点t。n和m为0时输入结束。 (1<n<=1000, 0<m<100000, s != t) 输出: 输出 一行有两个数, 最短距离及其花费。 2,建立一个图 3,建一个图书馆管理系统,说明:程序使用说明: 本程序是简单的图书管理系统,分为添加新书、浏览全部图书和删除图书三个功能。 输入1可添加新书,分别输入书名、ISDN、价格和作者后,即添加完成。 输入2可浏览全部的图书。 输入3可删除图书,输入要删除的行号,即可删除该行,如果输入的行号是最后一行,即删除全部。 4,最小生成树prim算法 5,C++primer 教材电子版(第四版)-1, the shortest path problem: Give you n points, m strip undirected edges, each side has a length d and spending p, to give you a starting point s end t, the required output starting the shortest distance to the end of its cost, if the shortest distance between multiple routes, the output of the least expensive. Input: Input n, m, the point number is 1 ~ n, then the m rows, each row 4 numbers a, b, d, p, between a and b represents an edge and having a length of d, cost for p . The last line is the two numbers s, t starting point s, end t. n and m are 0:00 input ends. (1 <n <= 1000, 0 <m <100000, s! = T) Output: There are two output a line number, the shortest distance and cost. 2, the establishment of a graph 3, built a library management system, Definitions: Instructions for use: This program is a simple library management system, divided into adding new books, browse books and books delete all three functions. Enter 1 to add new books, and receive
Date
: 2025-12-19
Size
: 2.33mb
User
:
刘小喵
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.