Floyd-Warshall算法描述 1)適用范圍: a)APSP(All Pairs Shortest Paths) b)稠密圖效果最佳 c)邊權可正可負 2)算法描述: a)初始化:dis[u,v]=w[u,v] b)For k:=1 to n For i:=1 to n For j:=1 to n If dis[i,j]>dis[i,k]+dis[k,j] Then Dis[I,j]:=dis[I,k]+dis[k,j] c)算法結束:dis即為所有點對的最短路徑矩陣 3)算法小結:此算法簡單有效,由于三重循環結構緊湊,對于稠密圖,效率要高于執行|V|次Dijkstra算法。時間復雜度O(n^3)。 考慮下列變形:如(I,j)∈E則dis[I,j]初始為1,else初始為0,這樣的Floyd算法最后的最短路徑矩陣即成為一個判斷I,j是否有通路的矩陣。更簡單的,我們可以把dis設成boolean類型,則每次可以用“dis[I,j]:=dis[I,j]or(dis[I,k]and dis[k,j])”來代替算法描述中的藍色部分,可以更直觀地得到I,j的連通情況。
標簽: Floyd-Warshall Shortest Pairs Paths
上傳時間: 2013-12-01
上傳用戶:dyctj
The PCI Local bus concept was developed to break the PC data I/O bottleneck and clearly opens the door to increasing system speed and expansion capabilities. The PCI Local bus moves high speed peripherals from the I/O bus and places them closer to the system’s processor bus, providing faster data transfers between the processor and peripherals. The PCI Local bus also addresses the industry’s need for a bus standard which is not directly dependent on the speed, size and type of system processor. It represents the first microprocessor independent bus offering performance more than adequate for the most demanding applications such as full-motion video.
標簽: bottleneck developed the concept
上傳時間: 2014-12-03
上傳用戶:ikemada
The PCI Local bus concept was developed to break the PC data I/O bottleneck and clearly opens the door to increasing system speed and expansion capabilities. The PCI Local bus moves high speed peripherals from the I/O bus and places them closer to the system’s processor bus, providing faster data transfers between the processor and peripherals. The PCI Local bus also addresses the industry’s need for a bus standard which is not directly dependent on the speed, size and type of system processor. It represents the first microprocessor independent bus offering performance more than adequate for the most demanding applications such as full-motion video. Hardware reference
標簽: bottleneck developed the concept
上傳時間: 2016-03-18
上傳用戶:極客
The PCI Local bus concept was developed to break the PC data I/O bottleneck and clearly opens the door to increasing system speed and expansion capabilities. The PCI Local bus moves high speed peripherals from the I/O bus and places them closer to the system’s processor bus, providing faster data transfers between the processor and peripherals. The PCI Local bus also addresses the industry’s need for a bus standard which is not directly dependent on the speed, size and type of system processor. It represents the first microprocessor independent bus offering performance more than adequate for the most demanding applications such as full-motion video. User Manual
標簽: bottleneck developed the concept
上傳時間: 2014-01-15
上傳用戶:努力努力再努力
Problem D:合唱隊形 Time Limit:1000MS Memory Limit:65536K Total Submit:1237 Accepted:437 Language: not limited Description N位同學站成一排,音樂老師要請其中的(N-K)位同學出列,使得剩下的K位同學排成合唱隊形。 合唱隊形是指這樣的一種隊形:設K位同學從左到右依次編號為1,2…,K,他們的身高分別為T1,T2,…,TK, 則他們的身高滿足T1 < T2 < ...< Ti > Ti+1 > … >TK(1<=i<=K)。 你的任務是,已知所有N位同學的身高,計算最少需要幾位同學出列,可以使得剩下的同學排成合唱隊形。 Input 輸入包含若干個測試用例。 對于每個測試用例,輸入第一行是一個整數N(2<=N<=100),表示同學的總數。第二行有N個整數,用空格分隔,第i個整數Ti(130<=Ti<=230)是第i位同學的身高(厘米)。當輸入同學總數N為0時表示輸入結束。 Output 對于每個測試案例,輸出包括一行,這一行只包含一個整數,就是最少需要幾位同學出列。 Sample Input 8 186 186 150 200 160 130 197 220 3 150 130 140 0 Sample Output 4 1
標簽: Limit Accepted Language Problem
上傳時間: 2014-01-13
上傳用戶:aappkkee
RMQ問題是指:對于長度為n的數列A,回答若干詢問RMQ(A,i,j)(i,j<=n),返回數列A中下標在[i,j]里的最小值下標。
上傳時間: 2013-12-26
上傳用戶:rocwangdp
C51實用程序(45個) I/O、定時器、中斷、看門狗、計數器、軟件AD、VB串口、93c06驅動、24c02系列驅動、7219、20045、軟件陷阱、串口中斷、碼值轉換、AVR通訊、IIC、DS1302、DS1820、SPI、1602、12232、12864、T6963、1330、PC鍵、鍵盤輸入法、智能化、飛機游戲、貪吃蛇、多級菜單實例等
上傳時間: 2016-06-17
上傳用戶:hasan2015
熟悉D/A轉換芯片的使用 把待轉換的數據送D/A芯片TLC5615,開啟D/A轉換 用萬用表或者示波器觀察輸出口(CON36)的電壓 硬件要求:撥碼開關S8全部置ON 其他撥碼開關全部置O
上傳時間: 2013-12-15
上傳用戶:zxc23456789
adctest S3C44B0X內置A/D轉換器應用實例; einttest S3C44B0X外部中斷實例; flashtest flash讀寫實例; Helloworld Helloworld程序; iictest IIC接口運用實例; iotest I/O應用實例——矩陣式鍵盤掃描; rtctest S3C44B0X內置RTC應用實例; Timertest 定時器應用實例; uarttest UART串行口應用實例; ucos_ex1 uc/os-II運用之一:多任務; ucos_ex2 uc/os-II運用之二:任務間通訊; ucos_ex3 uc/os-II運用之三:中斷服務程序;
標簽: Helloworld S3C44B0X flashtest einttest
上傳時間: 2014-01-13
上傳用戶:xc216
adctest S3C44B0X內置A/D轉換器應用實例; einttest S3C44B0X外部中斷實例; flashtest flash讀寫實例; Helloworld Helloworld程序; iictest IIC接口運用實例; iotest I/O應用實例——矩陣式鍵盤掃描; rtctest S3C44B0X內置RTC應用實例; Timertest 定時器應用實例; uarttest UART串行口應用實例; ucos_ex1 uc/os-II運用之一:多任務; ucos_ex2 uc/os-II運用之二:任務間通訊; ucos_ex3 uc/os-II運用之三:中斷服務程序;
標簽: Helloworld S3C44B0X flashtest einttest
上傳時間: 2016-07-05
上傳用戶:wanghui2438