圖的深度遍歷,輸出結(jié)果為(紅色為鍵盤輸入的數(shù)據(jù),權(quán)值都置為1): 輸入頂點(diǎn)數(shù)和弧數(shù):8 9 輸入8個(gè)頂點(diǎn). 輸入頂點(diǎn)0:a 輸入頂點(diǎn)1:b 輸入頂點(diǎn)2:c 輸入頂點(diǎn)3:d 輸入頂點(diǎn)4:e 輸入頂點(diǎn)5:f 輸入頂點(diǎn)6:g 輸入頂點(diǎn)7:h 輸入9條弧. 輸入弧0:a b 1 輸入弧1:b d 1 輸入弧2:b e 1 輸入弧3:d h 1 輸入弧4:e h 1 輸入弧5:a c 1 輸入弧6:c f 1 輸入弧7:c g 1 輸入弧8:f g 1 深度優(yōu)先遍歷: a b d h e c f g 程序結(jié)束.
標(biāo)簽:
上傳時(shí)間: 2016-04-04
上傳用戶:lht618
編程題(15_01.c) 結(jié)構(gòu) struct student { long num char name[20] int score struct student *next } 鏈表練習(xí): (1).編寫函數(shù)struct student * creat(int n),創(chuàng)建一個(gè)按學(xué)號(hào)升序排列的新鏈表,每個(gè)鏈表中的結(jié)點(diǎn)中 的學(xué)號(hào)、成績(jī)由鍵盤輸入,一共n個(gè)節(jié)點(diǎn)。 (2).編寫函數(shù)void print(struct student *head),輸出鏈表,格式每行一個(gè)結(jié)點(diǎn),包括學(xué)號(hào),姓名,分?jǐn)?shù)。 (3).編寫函數(shù)struct student * merge(struct student *a,struct student *b), 將已知的a,b兩個(gè)鏈表 按學(xué)號(hào)升序合并,若學(xué)號(hào)相同則保留成績(jī)高的結(jié)點(diǎn)。 (4).編寫函數(shù)struct student * del(struct student *a,struct student *b),從a鏈表中刪除b鏈表中有 相同學(xué)號(hào)的那些結(jié)點(diǎn)。 (5).編寫main函數(shù),調(diào)用函數(shù)creat建立2個(gè)鏈表a,b,用print輸出倆個(gè)鏈表;調(diào)用函數(shù)merge升序合并2個(gè) 鏈表,并輸出結(jié)果;調(diào)用函數(shù)del實(shí)現(xiàn)a-b,并輸出結(jié)果。 a: 20304,xxxx,75, 20311,yyyy,89 20303,zzzz,62 20307,aaaa,87 20320,bbbb,79 b: 20302,dddd,65 20301,cccc,99 20311,yyyy,87 20323,kkkk,88 20307,aaaa,92 20322,pppp,83
標(biāo)簽: student struct score long
上傳時(shí)間: 2016-04-13
上傳用戶:zxc23456789
正整數(shù)x 的約數(shù)是能整除x 的正整數(shù)。正整數(shù)x 的約數(shù)個(gè)數(shù)記為div(x)。例如,1,2, 5,10 都是正整數(shù)10 的約數(shù),且div(10)=4。設(shè)a 和b 是2 個(gè)正整數(shù),a≤b,找出a 和b 之間約數(shù)個(gè)數(shù)最多的數(shù)x。
上傳時(shí)間: 2014-11-24
上傳用戶:gxmm
J2EE高校學(xué)籍管理信息系統(tǒng)的設(shè)計(jì)及實(shí)現(xiàn) 本文中的學(xué)籍信息管理系統(tǒng)將 Mvc 以ModelViewControl) 模式和J2EE相結(jié)合,使界面與業(yè)務(wù)邏輯徹底分離,在系統(tǒng)架構(gòu)中各司其職、互不干涉,具有較強(qiáng)的伸縮性、 通用性和可操作性。 文中用統(tǒng)一建模語言UML對(duì)系統(tǒng)進(jìn)行詳細(xì)分析,并給出了系統(tǒng)的具體設(shè)計(jì), 包括系統(tǒng)結(jié)構(gòu)設(shè)計(jì)、數(shù)據(jù)庫 設(shè)計(jì)、信息安全訪問設(shè)計(jì)等。 此外,本文還著重描述了系統(tǒng)實(shí)現(xiàn)過程中的一些關(guān)鍵技術(shù), 包括在系統(tǒng)數(shù)據(jù)訪問,實(shí) 現(xiàn)的 相關(guān)技術(shù)( 如 數(shù)據(jù)庫連接池技術(shù)) 以 及加密技術(shù)等。 系統(tǒng)采用基于J ZE E 多層結(jié)構(gòu),各項(xiàng)應(yīng)用均在We b上展開,通過We b方式完成用 戶與系統(tǒng)的交互。瀏覽器層為用戶提供可視化圖形界面 We b服務(wù)層響應(yīng)客戶請(qǐng)求,為 客戶提供所請(qǐng)求的數(shù)據(jù) 應(yīng)用服務(wù)層進(jìn)行應(yīng)用邏輯計(jì)算,完成瀏覽器請(qǐng)求的相應(yīng)的商業(yè) 計(jì)算和業(yè)務(wù)數(shù)據(jù)操作 數(shù)據(jù)庫層存儲(chǔ)、管理數(shù)據(jù)信息。采用多層結(jié)構(gòu)的方式使得系統(tǒng)具 有很強(qiáng)的伸縮性、通用性、兼容性和可操作性,每一層能夠?qū)W⒂谔囟ǖ慕巧凸δ堋? 系統(tǒng)的實(shí)現(xiàn)中采用J a va 的加密技術(shù)完成用戶信息的加密、 認(rèn)證功能 采用數(shù)據(jù)庫連接池 技術(shù)提高系統(tǒng)的數(shù)據(jù)庫訪問效率等。
標(biāo)簽: J2EE ModelViewControl Mvc 管理信息系統(tǒng)
上傳時(shí)間: 2016-06-01
上傳用戶:離殤
ActiveX Data Objects Programming in C++ Description: ActiveX Data Objects Programming How To: Hey, this is some kind of an experiment in writing tutorials in PSC. All of my articles are in .html files included in the zip file, together with the sample code
標(biāo)簽: Programming ActiveX Objects Data
上傳時(shí)間: 2013-12-22
上傳用戶:水口鴻勝電器
正整數(shù)x 的約數(shù)是能整除x 的正整數(shù)。正整數(shù)x 的約數(shù)個(gè)數(shù)記為div(x)。例如,1,2,5,10 都是正整數(shù)10 的約數(shù),且div(10)=4。設(shè)a 和b 是2 個(gè)正整數(shù),a≤b,找出a 和b之間約數(shù)個(gè)數(shù)最多的數(shù)x。 對(duì)于給定的2 個(gè)正整數(shù)a≤b,編程計(jì)算a 和b 之間約數(shù)個(gè)數(shù)最多的數(shù)。 數(shù)據(jù)輸入 輸入數(shù)據(jù)由文件名為input.txt的文本文件提供。文件的第1 行有2 個(gè)正整數(shù)a和b。 結(jié)果輸出 程序運(yùn)行結(jié)束時(shí),若找到的a 和b 之間約數(shù)個(gè)數(shù)最多的數(shù)是x,將div(x)輸出到文件output.txt中。 輸入文件示例 輸出文件示例 input.txt output.txt 1 36 9
上傳時(shí)間: 2016-10-10
上傳用戶:dianxin61
一元稀疏多項(xiàng)式計(jì)算器的基本功能是: (1)輸入并建立多項(xiàng)式; (2)輸出多項(xiàng)式,輸出形式為整數(shù)序列:n,c1,e1,c2,e2,….,cn,en, 其中n是多項(xiàng)式的項(xiàng)數(shù),ci和ei分別是第I項(xiàng)的系數(shù)和指數(shù),序列按照指數(shù)降序排列; (3)多項(xiàng)式a和b相加,建立多項(xiàng)式a+b (4)多項(xiàng)式a和b相減,建立多項(xiàng)式a-b.
標(biāo)簽: 多項(xiàng)式 稀疏 計(jì)算器 輸入
上傳時(shí)間: 2016-10-25
上傳用戶:時(shí)代電子小智
This document accompanies a sample co-installer that can be used in conjunction with an INF file to install additional device INF files on the target system during a device installation. The instructions herein apply to the Microsoft Windows 2000 and Windows XP and Windows Server 2003 operating systems. The sample co-installer described in this article interprets CopyINF directives in a [DDInstall] section in an INF file. The sample demonstrates using a co-installer to perform processing after a device has been installed, parsing the INF section that is being used for the installation, and the use of the SetupCopyOEMInf, SetupGetInfInformation, SetupQueryInfOriginalFileInformation and SetupDiGetActualSectionToInstall APIs.
標(biāo)簽: co-installer accompanies conjunction document
上傳時(shí)間: 2014-02-28
上傳用戶:gououo
實(shí)現(xiàn)一位加法器的設(shè)計(jì),假設(shè)輸入?yún)?shù)為A,B,則輸出為A,B的和
標(biāo)簽: 加法器
上傳時(shí)間: 2017-01-02
上傳用戶:baiom
This article presents GISCoordinate.java - a class that allows you to represent a GIS coordinate in your JAVA code in decimal degrees (38.4443, e.g. 122.33433) , minute degrees (33 44 22E, 122 33 44N), or radian degrees. Also, you can use this class to manipulate the coordinate, moving it around the globe by giving it distances in feet and direction of travel. You can then extract the new coordinate that is calculated after the travel.
標(biāo)簽: GISCoordinate coordinate represent presents
上傳時(shí)間: 2013-12-02
上傳用戶:wangchong
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1