This is a binary search tree with void* pointer in data segment in order you to search store and delete O(n) worst case, O(log(n)) agerage case data.
標(biāo)簽: search pointer segment binary
上傳時(shí)間: 2013-12-22
上傳用戶:wys0120
最小生成樹 MST的四種算法實(shí)現(xiàn)。 包括普通的Kruskal算法和Prim算法,用Disjoint-Set優(yōu)化的Kruskal算法和用Heap優(yōu)化的堆算法。 復(fù)雜度分別為O(mn), O(n^2), O(m log n), O(m log n)
上傳時(shí)間: 2013-12-10
上傳用戶:stewart·
Lorsque vous créez et enregistrez des documents Macromedia Flash MX 2004 et Macromedia Flash MX Professionnel 2004 dans l’environnement auteur de Flash, ils sont au format FLA. Pour afficher un document dans Macromedia Flash Player, vous devez le publier ou l’exporter au format SWF. Remarque : Pour plus d’informations sur la publication ou l’exportation d’un fichier, consultez le Chapitre 15, Publication, page 299 ou le Chapitre 16, Exportation, page 333. Vous pouvez ajouter du contenu multimédia à un document Flash et gérer ce contenu dans la bibliothèque. L’explorateur d’animations vous permet d’afficher et d’organiser l’ensemble des éléments dans un document Flash. Les options Annuler et Répéter, le panneau Historique et le menu Commandes vous permettent d’automatiser vos tâ ches dans un document.
標(biāo)簽: Macromedia Flash enregistrez documents
上傳時(shí)間: 2017-07-12
上傳用戶:epson850
128單片機(jī)自帶A/D接口的A/D轉(zhuǎn)換程序,用C語言編寫
標(biāo)簽: A/D轉(zhuǎn)換 128單片機(jī)
上傳時(shí)間: 2015-06-04
上傳用戶:a251341772
keil C51 v6.12 完全解密版的安裝說明 安裝方法是先將V6.12安裝程序用復(fù)制到某個(gè)目錄下,如復(fù)制到D:\keilC51 然后執(zhí)行D:\keilC51\setup\setup.exe 安裝程序,選擇安裝Eval Version版進(jìn) 行安裝。 注冊碼:K199U-20071-12A9U 當(dāng)出現(xiàn)Please insert the add-on disk的提示畫面,可按next按鈕(不用 插入軟盤)。 安裝好之后就可以使用,沒有代碼大小的限制,這是完全版,比 Eval版增 加浮點(diǎn)庫等內(nèi)容。
標(biāo)簽: keilC51v612
上傳時(shí)間: 2015-07-17
上傳用戶:f29876
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運(yùn)動員*/ { char name[20]; int score; /*分?jǐn)?shù)*/ int range; /**/ int item; /*項(xiàng)目*/ }ATH; typedef struct schoolstruct /*學(xué)校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分?jǐn)?shù)*/ int womenscore; /*女選手分?jǐn)?shù)*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運(yùn)動項(xiàng)目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個(gè)項(xiàng)目已經(jīng)存在請選擇其他的數(shù)字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項(xiàng)目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學(xué)校數(shù)目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input name:) : "); scanf("%s",pfirst->athlete[pfirst->count].name); } printf("\n繼續(xù)輸入運(yùn)動項(xiàng)目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學(xué)校的結(jié)果成績:",pfirst->serial); printf("\n\n項(xiàng)目的數(shù)目\t學(xué)校的名字\t分?jǐn)?shù)"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進(jìn)入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運(yùn)動會結(jié)果:\n\n學(xué)校編號\t男運(yùn)動員成績\t女運(yùn)動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結(jié)束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經(jīng)成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運(yùn)動會分?jǐn)?shù)統(tǒng)計(jì)\n"); printf("輸入學(xué)校數(shù)目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項(xiàng)目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項(xiàng)目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標(biāo)簽: 源代碼
上傳時(shí)間: 2016-12-28
上傳用戶:150501
郭天祥版教程用 安裝方法是先將V6.12安裝程序用復(fù)制到某個(gè)目錄下,如復(fù)制到D:\keilC51 然后執(zhí)行D:\keilC51\setup\setup.exe 安裝程序,選擇安裝Eval Version版進(jìn) 行安裝。
上傳時(shí)間: 2017-06-19
上傳用戶:359981736
#include<stdio.h> #include<windows.h> int xuanxiang; int studentcount; int banjihao[100]; int xueqihao[100][10]; char xm[100][100]; int xuehao[100][10]; int score[100][3]; int yuwen; int shuxue[000]; int yingyu[100]; int c[100]; int p; char x[1000][100]="",y[100][100]="";/*x學(xué)院 y專業(yè) z班級*/ int z[100]; main() { void input(); void inputsc(); void alter(); void scbybannji(); printf("--------學(xué)生成績管理-----\n"); printf("請按相應(yīng)數(shù)字鍵來實(shí)現(xiàn)相應(yīng)功能\n"); printf("1.錄入學(xué)生信息 2.錄入學(xué)生成績 3.修改學(xué)生成績\n"); printf("4.查詢學(xué)生成績 5.不及格科目及名單 6.按班級輸出學(xué)生成績單\n"); printf("請輸入你要實(shí)現(xiàn)的功能所對應(yīng)的數(shù)字:"); scanf("%d",&xuanxiang); system("cls"); getchar(); switch (xuanxiang) { case 1:input(); case 2:inputsc(); case 3:alter(); /*case 4:select score(); case 5:bujigekemujimingdan();*/ case 6:scbybanji; } } void input() { int i; printf("請輸入你的學(xué)院名稱:"); gets(x); printf("請輸入你的專業(yè)名稱:"); gets(y); printf("請輸入你的班級號:"); scanf("%d",&z); printf("請輸入你們一個(gè)班有幾個(gè)人:"); scanf("%d",&p); system("cls"); for(i=0;i<p;i++) { printf("請輸入第%d個(gè)學(xué)生的學(xué)號:",i+1); scanf("%d",xuehao[i]); getchar(); printf("請輸入第%d個(gè)學(xué)生的姓名:",i+1); gets(xm[i]); system("cls"); } printf("您已經(jīng)錄入完畢您的班級所有學(xué)生的信息!\n"); printf("您的班級為%s%s%s\n",x,y,z); /*alter(p);*/ } void inputsc() { int i; for(i=0;i<p;i++) { printf("\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t錄入學(xué)生的成績\n\n\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t%s\n",xm[i]); printf("\n"); printf("\t\t\t\t數(shù)學(xué):"); scanf("%d",&shuxue[i]); printf("\n"); getchar(); printf("\t\t\t\t英語:"); scanf("%d",&yingyu[i]); printf("\n"); getchar(); printf("\t\t\t\tc語言:"); scanf("%d",&c[i]); system("cls"); } } void alter() { int i;/*循環(huán)變量*/ int m[10000];/*要查詢的學(xué)號*/ int b;/*修改后的成績*/ char kemu[20]=""; printf("請輸入你要修改的學(xué)生的學(xué)號"); scanf("%d",&m); for (i=0;i<p;i++) { if (m==xuehao[i]) { printf("%s的數(shù)學(xué)成績?yōu)?d,英語成績?yōu)?d,c語言成績?yōu)?d,xm[i],shuxue[i],yingyu[i],c[i]"); printf("請輸入你想修改的科目");} } gets(kemu); getchar(); if (kemu=="數(shù)學(xué)"); { scanf("%d",&b); shuxue[i]=b;} if (kemu=="英語"); { scanf("%d",&b); yingyu[i]=b;} if (kemu=="c語言"); { scanf("%d",&b); c[i]=b; } printf("%s的數(shù)學(xué)成績?yōu)?d,英語成績?yōu)?d,c語言成績?yōu)?d,xm[i],shuxue[i],yingyu[i],c[i]"); } void scbybannji() { int i; char zyname[20]; int bjnumber; printf("請輸入你的專業(yè)名稱"); scanf("%s",&zyname); printf("請輸入你的班級號"); scanf("%d",&bjnumber); for (i=0;i<p;i++) { if (zyname==y[i]); if (bjnumber==z[i]); printf("專業(yè)名稱%s班級號%d數(shù)學(xué)成績%d英語成績%dc語言成績%d,y[i],z[i],shuxue[i],yingyu[i],c[i]"); } }
標(biāo)簽: c語言
上傳時(shí)間: 2018-06-08
上傳用戶:2369043090
%球體 close all; G=6.67e-11; R=2;%球體半徑 p=4.0;%密度 D=10.0;%深度 M=(4/3)*pi*R^3*p;%質(zhì)量 x=-20:1:20; g=G*M*D./((x.^2+D^2).^(3/2)); Vxz=-3*G*M*D.*x./((x.^2+D^2).^(5/2)); Vzz=G*M.*(2*D^2-x.^2)./((x.^2+D^2).^(5/2)); Vzzz=3*G*M.*(2*D^2-3.*x.^2)./((x.^2+D^2).^(7/2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('球體重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzzz'); grid on %% %水平圓柱體 close all G=6.67e-11; p=10.0;%線密度 D=100.0;%深度 x=-200:1:200; g=G*2*p*D./(x.^2+D^2); Vxz=4*G*p*D.*x./(x.^2+D^2).^2; Vzz=2*G*p.*(D^2-x.^2)./(x.^2+D^2).^2; Vzzz=4*G*p.*(D^2-3.*x.^2)./((x.^2+D^2).^3); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('水平圓柱體重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzzz'); grid on %% %垂直臺階 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 x=-100:1:100; g=G*p.*(pi*(h1-h2)+x.*log((x.^2+h1^2)./(x.^2+h2^2))+2*h1.*atan(x./h1)-2*h2.*atan(x./h2)); Vxz=G*p.*log((h1^2+x.^2)./(h2^2+x.^2)); Vzz=2*G*p.*atan((x.*(h1-h2))./(x.^2+h1*h2)); Vzzz=2*G*p.*x*(h1^2-h2^2)./((h1^2+x.^2).*(x.^2+h2^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('垂直臺階重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzzz'); grid on %% %傾斜臺階 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 a=pi/6;%傾斜角度 x=-500:1:500; g=G*p.*(pi*(h1-h2)+2*h1.*atan((x+h1*cot(a))./h1)-2*h2.*atan((x+h2*cot(a))./h1)+x.*sin(a)^2.*log(((h1+x.*sin(a).*cos(a)).^2+x.^2.*sin(a)^4)./((h2+x.*(sin(a)*cos(a))).^2+x.^2.*sin(a)^4))); Vxz=G*p.*(sin(a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))-2*sin(2*a).*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.^cos(a))./(sin(a).*x)))); Vzz=G*p.*(0.5*sin(2*a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))+2*sin(a)^2.*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.*cos(a))./(x.*sin(a))))); Vzzz=2*G*p*sin(a)^2.*((x+2*h2*cot(a))./((h2*cot(a)+x).^2+h2^2)-(x+2*h1*cot(a))./((h1*cot(a)+x).^2+h1^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('傾斜臺階重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzzz'); grid on %% %鉛錘柱體 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 a=3;%半徑 x=-500:1:500; g=G*p.*((x+a).*log(((x+a).^2+h1^2)./((x+a).^2+h2^2))-(x-a).*log(((x-a).^2+h1^2)./((x-a).^2+h2^2))+2*h1.*(atan((x+a)./h1)-atan((x-a)./h1))-2*h2.*(atan((x+a)./h2)-atan((x-a)./h2))); Vxz=G*p.*log((((x+a).^2+h1^2).*((x-a).^2+h2^2))./(((x+a).^2+h2^2).*((x-a).^2+h1^2))); Vzz=2*G*p.*(atan(h1./(x+a))-atan(h2./(x+a))-atan(h1./(x-a))+atan(h2./(x-a))); Vzzz=2*G*p.*((x+a)./((x+a).^2+h2^2)-(x+a)./((x+a).^2+h1^2)-(x-a)./((x-a).^2+h2^2)+(x-a)./((x-a).^2+h1^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離/m') ylabel('重力異常值') title('鉛垂柱體重力異常') grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導(dǎo)數(shù)值'); title('Vzzz'); grid on
上傳時(shí)間: 2019-05-10
上傳用戶:xiajiang
第 1 章 概述 產(chǎn)品概貌 第 8 章 介紹過程數(shù)據(jù)庫 數(shù)據(jù)庫標(biāo)簽 數(shù)據(jù)庫編輯器 第 2 章 iFIX 結(jié)構(gòu) 基本結(jié)構(gòu) 分布式結(jié)構(gòu) 第 9 章 數(shù)字量標(biāo)簽 數(shù)字量輸入標(biāo)簽 數(shù)字量輸出標(biāo)簽 第 3 章 系統(tǒng)配置 路徑配置,報(bào)警配置 網(wǎng)絡(luò)配置,任務(wù)配置 第 10 章 圖形對象 屬性窗口 數(shù)據(jù)連接,表達(dá)式編輯器 第 4 章 I/O 驅(qū)動器 安裝 I/O 驅(qū)動器 配置 I/O 驅(qū)動器 第 11 章 動畫對象 動畫專家 動畫對話框
上傳時(shí)間: 2019-11-12
上傳用戶:lq6424598
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1