calculates the shortest path and distance between two nodes on a map
標(biāo)簽: calculates shortest distance between
上傳時間: 2014-06-14
上傳用戶:372825274
#include<iostream> using namespace std int main() { unsigned long x,warcraft,war,l cin> x while(x) { unsigned long *p=new unsigned long[x+1] if(p==NULL) { cerr<<"error!"<<endl abort() } for(warcraft=0 warcraft<=x warcraft++) *(p+warcraft)=0 *p=1 for(warcraft=0 warcraft<x warcraft++) { cout<<*p<<" " war=*p for(l=1 x>1 l++) { if(*(p+l)==0) { cout<<endl *(p+l)=1 break } else { cout<<*(p+l)<<" " *(p+l)=war+*(p+l) war=*(p+l)-war } } } cout<<endl delete [] p cin>>x } return 0 }
標(biāo)簽: namespace iostream unsigned warcraft
上傳時間: 2015-12-12
上傳用戶:manlian
C51的兩個程序,一個是將LONG型十六進(jìn)制數(shù)據(jù)轉(zhuǎn)換成LONG型的十進(jìn)制數(shù),另一個則是逆運(yùn)算
標(biāo)簽: LONG C51 程序 十六進(jìn)制
上傳時間: 2014-01-24
上傳用戶:maizezhen
a small program by Yuval Fisher that has gone a long way to revealing some of the secrets of fracal image compression.
標(biāo)簽: revealing program secrets Fisher
上傳時間: 2015-12-24
上傳用戶:腳趾頭
武林DLL注入源碼 VB調(diào)用 Private Declare Function CallHotKey Lib "wulin.dll" (ByVal hWnd As Long, ByVal hotkey As Long) As Boolean Private Declare Function CallBase Lib "wulin.dll" (ByVal hWnd As Long, ByVal action As Long) As Boolean CallHotKey(窗體句柄,HotKey) HotKey ====0---------17 分別是0-----9 F1-----F8 CallBase(窗體句柄,Action) Action==0-------N 分別實(shí)現(xiàn)不同的功能 Action=0 選怪 函數(shù)反回值是 布爾值 ( 窗體句柄,Action 窗體句柄,HotKey 都為DWORD值)
標(biāo)簽: ByVal CallHotKey Function Private
上傳時間: 2013-11-25
上傳用戶:maizezhen
1 #define GPBCON (*(volatile unsigned long *)0x56000010) 2 #define GPBDAT (*(volatile unsigned long *)0x56000014) 3 #define GPFCON (*(volatile unsigned long *)0x56000050) 4 #define GPFDAT (*(volatile unsigned long *)0x56000054)
標(biāo)簽: volatile unsigned define long
上傳時間: 2013-12-27
上傳用戶:BIBI
zigbee路由算法采用AODV(Ad hoc On Demand Distance Vetor)算法。每個路由器維護(hù)一張路由表,并定期與其鄰居路由器交換路由信息,根據(jù)最小路由矢量更新自己的路由表。應(yīng)用層框架定義監(jiān)護(hù)網(wǎng)絡(luò)節(jié)點(diǎn)協(xié)議。
標(biāo)簽: Distance zigbee Demand Vetor
上傳時間: 2016-03-21
上傳用戶:PresidentHuang
Just what is a regular expression, anyway? Take the tutorial to get the long answer. The short answer is that a regular expression is a compact way of describing complex patterns in texts. You can use them to search for patterns and, once found, to modify the patterns in complex ways. You can also use them to launch programmatic actions that depend on patterns. A tongue-in-cheek comment by programmers is worth thinking about: "Sometimes you have a programming problem and it seems like the best solution is to use regular expressions now you have two problems." Regular expressions are amazingly powerful and deeply expressive. That is the very reason writing them is just as error-prone as writing any other complex programming code. It is always better to solve a genuinely simple problem in a simple way when you go beyond simple, think about regular expressions. Tutorial: Using regular expressions
標(biāo)簽: expression the tutorial regular
上傳時間: 2013-12-19
上傳用戶:sardinescn
編程題(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)建一個按學(xué)號升序排列的新鏈表,每個鏈表中的結(jié)點(diǎn)中 的學(xué)號、成績由鍵盤輸入,一共n個節(jié)點(diǎn)。 (2).編寫函數(shù)void print(struct student *head),輸出鏈表,格式每行一個結(jié)點(diǎn),包括學(xué)號,姓名,分?jǐn)?shù)。 (3).編寫函數(shù)struct student * merge(struct student *a,struct student *b), 將已知的a,b兩個鏈表 按學(xué)號升序合并,若學(xué)號相同則保留成績高的結(jié)點(diǎn)。 (4).編寫函數(shù)struct student * del(struct student *a,struct student *b),從a鏈表中刪除b鏈表中有 相同學(xué)號的那些結(jié)點(diǎn)。 (5).編寫main函數(shù),調(diào)用函數(shù)creat建立2個鏈表a,b,用print輸出倆個鏈表;調(diào)用函數(shù)merge升序合并2個 鏈表,并輸出結(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
上傳時間: 2016-04-13
上傳用戶:zxc23456789
堆棧的數(shù)據(jù)結(jié)構(gòu)和操作 ypedef struct{ HGLOBAL hMem //堆棧全局內(nèi)存句柄 POINT *lpMyStack //指向該句柄的指針 LONG ElementsNum //堆棧的大小 LONG ptr //指向棧頂?shù)弥羔?/p>
標(biāo)簽: ElementsNum lpMyStack HGLOBAL ypedef
上傳時間: 2013-11-26
上傳用戶:15736969615
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1