亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

開(kāi)關(guān)(guān)穩(wěn)(wěn)壓

  • 將指定的1到n

    將指定的1到n ,共n個整數(shù)進行全排列。

    標簽:

    上傳時間: 2017-08-30

    上傳用戶:sxdtlqqjl

  • 旅行商問題(Travelling Salesman Problem, 簡記TSP

    旅行商問題(Travelling Salesman Problem, 簡記TSP,亦稱貨郎擔問題):設(shè)有n個城市和距離矩陣D=[dij],其中dij表示城市i到城市j的距離,i,j=1,2 … n,則問題是要找出遍訪每個城市恰好一次的一條回路并使其路徑長度為最短。

    標簽: Travelling Salesman Problem TSP

    上傳時間: 2017-09-14

    上傳用戶:彭玖華

  • 利用棧的基本操作實現(xiàn)將任意一個十進制整數(shù)N轉(zhuǎn)化為R進制整數(shù)。

    #include <stdlib.h> #include<stdio.h> #include <malloc.h> #define stack_init_size 100 #define stackincrement 10 typedef struct sqstack { int *base; int *top; int stacksize; } sqstack; int StackInit(sqstack *s) { s->base=(int *)malloc(stack_init_size *sizeof(int)); if(!s->base) return 0; s->top=s->base; s->stacksize=stack_init_size; return 1; } int Push(sqstack *s,int e) { if(s->top-s->base>=s->stacksize) { s->base=(int *)realloc(s->base,(s->stacksize+stackincrement)*sizeof(int)); if(!s->base) return 0; s->top=s->base+s->stacksize; s->stacksize+=stackincrement; } *(s->top++)=e; return e; } int Pop(sqstack *s,int e) { if(s->top==s->base) return 0; e=*--s->top; return e; } int stackempty(sqstack *s) { if(s->top==s->base) { return 1; } else { return 0; } } int conversion(sqstack *s) { int n,e=0,flag=0; printf("輸入要轉(zhuǎn)化的十進制數(shù):\n"); scanf("%d",&n); printf("要轉(zhuǎn)化為多少進制:\n"); scanf("%d",&flag); printf("將十進制數(shù)%d 轉(zhuǎn)化為%d 進制是:\n",n,flag); while(n) { Push(s,n%flag); n=n/flag; } while(!stackempty(s)) { e=Pop(s,e); switch(e) { case 10: printf("A"); break; case 11: printf("B"); break; case 12: printf("C"); break; case 13: printf("D"); break; case 14: printf("E"); break; case 15: printf("F"); break; default: printf("%d",e); } } printf("\n"); return 0; } int main() { sqstack s; StackInit(&s); conversion(&s); return 0;                        }

    標簽: 整數(shù) 基本操作 十進制 轉(zhuǎn)化 進制

    上傳時間: 2016-12-08

    上傳用戶:愛你198

  • 運動會源代碼

    #include <malloc.h>       #include <stdio.h>       #include <stdlib.h>       #include <string.h>       #define NULL 0      #define MaxSize 30          typedef struct athletestruct /*運動員*/     {         char name[20];          int score; /*分數(shù)*/         int range; /**/         int item; /*項目*/     }ATH;     typedef struct schoolstruct /*學(xué)校*/     {         int count; /*編號*/         int serial; /**/          int menscore; /*男選手分數(shù)*/         int womenscore; /*女選手分數(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輸入運動項目序號 (x<=%d):",ntsp);         scanf("%d",pafirst);         overgame = *pafirst;         if ( pafirst != phead )         {             for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ )             {                 if ( overgame == *pasecond )                 {                     printf("\n這個項目已經(jīng)存在請選擇其他的數(shù)字\n");                     goto Is_Game_DoMain;                 }             }         }         pafirst = pafirst + 1;         if ( overgame > ntsp )         {             printf("\n項目不存在");             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)?");         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項目的數(shù)目\t學(xué)校的名字\t分數(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按任意建 進入下一頁");             getchar();             pfirst = pfirst->next;         }     //  clrscr();          printf("\n運動會結(jié)果:\n\n學(xué)校編號\t男運動員成績\t女運動員成績\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 運動會分數(shù)統(tǒng)計\n");         printf("輸入學(xué)校數(shù)目 (x>= 5):");         scanf("%d",&nsc);          printf("輸入男選手的項目(x<=20):");         scanf("%d",&msp);          printf("輸入女選手項目(<=20):");         scanf("%d",&wsp);          ntsp = msp + wsp;                  phead = (int *)calloc(ntsp,sizeof(int));         pafirst = phead;         pasecond = phead;         input();         calculate();          output();         Save();     }             

    標簽: 源代碼

    上傳時間: 2016-12-28

    上傳用戶:150501

  • 《算法設(shè)計與分析》實驗指導(dǎo)書

    設(shè)有n=2k個運動員要進行網(wǎng)球循環(huán)賽。現(xiàn)要設(shè)計一個滿足以下要求的比賽日程表:⑴每個選手必須與其他n-1個選手各賽一次;⑵每個選手一天只能賽一次;⑶循環(huán)賽一共進行n-1天。按此要求可將比賽日程表設(shè)計-成有n行和n-l列的一個表。在表中第i行和第j列處填入第i個選手在第j天所遇到的選手。用分治法編寫為該循環(huán)賽設(shè)計一張比賽日程表的算法并運行實現(xiàn)、對復(fù)雜度進行分析。

    標簽: 算法 實驗指導(dǎo)書 設(shè)計與分析

    上傳時間: 2019-06-04

    上傳用戶:594551562

  • C語言編寫雅可比迭代

    # include<stdio.h> # include<math.h> # define N 3 main(){     float NF2(float *x,float *y);     float A[N][N]={{10,-1,-2},{-1,10,-2},{-1,-1,5}};     float b[N]={7.2,8.3,4.2},sum=0;     float x[N]= {0,0,0},y[N]={0},x0[N]={};     int i,j,n=0;     for(i=0;i<N;i++)     {         x[i]=x0[i];     }     for(n=0;;n++){                 //計算下一個值     for(i=0;i<N;i++){         sum=0;         for(j=0;j<N;j++){             if(j!=i){                 sum=sum+A[i][j]*x[j];             }         }         y[i]=(1/A[i][i])*(b[i]-sum);         //sum=0;     }     //判斷誤差大小         if(NF2(x,y)>0.01){                 for(i=0;i<N;i++){         x[i]=y[i];     }     }             else             break;     }     printf("經(jīng)過%d次雅可比迭代解出方程組的解:\n",n+1);     for(i=0;i<N;i++){         printf("%f      ",y[i]);     } } //求兩個向量差的二范數(shù)函數(shù) float NF2(float *x,float *y){ int i; float z,sum1=0; for(i=0;i<N;i++){     sum1=sum1+pow(y[i]-x[i],2); } z=sqrt(sum1); return z; }

    標簽: C語言 編寫 迭代

    上傳時間: 2019-10-13

    上傳用戶:大萌萌撒

  • matlab神經(jīng)網(wǎng)絡(luò)算法通信信號調(diào)制識別

    %========================開始提取加噪信號的各類特征值================================ for n=1:1:50;     m=n*Ns;     x=(n-1)*Ns; for i=x+1:m;          %提取加噪信號'signal_with_noise=y+noise'的前256個元素,抽取50次     y0(i)=signal_with_noise(i); end Y=fft(y0);        %對調(diào)制信號進行快速傅里葉算法(離散) y1=hilbert(y0) ;    %調(diào)制信號實部的解析式  factor=0;        %開始求零中心歸一化瞬時幅度譜密度的最大值gamma_max for i=x+1:m;    factor=factor+y0(i); end ms=factor/(m-x); an_i=y0./ms; acn_i=an_i-1; end gamma_max=max(fft(acn_i.*acn_i))/Ns

    標簽: matlab 神經(jīng)網(wǎng)絡(luò)算法 通信信號 調(diào)制識別

    上傳時間: 2020-04-07

    上傳用戶:如拷貝般復(fù)制

  • matlab神經(jīng)網(wǎng)絡(luò)算法通信信號調(diào)制識別y

    %========================開始提取加噪信號的各類特征值================================ for n=1:1:50;     m=n*Ns;     x=(n-1)*Ns; for i=x+1:m;          %提取加噪信號'signal_with_noise=y+noise'的前256個元素,抽取50次     y0(i)=signal_with_noise(i); end Y=fft(y0);        %對調(diào)制信號進行快速傅里葉算法(離散) y1=hilbert(y0) ;    %調(diào)制信號實部的解析式  factor=0;        %開始求零中心歸一化瞬時幅度譜密度的最大值gamma_max for i=x+1:m;    factor=factor+y0(i); end ms=factor/(m-x); an_i=y0./ms; acn_i=an_i-1; end gamma_max=max(fft(acn_i.*acn_i))/Ns

    標簽: matlab 神經(jīng)網(wǎng)絡(luò)算法 通信信號 調(diào)制識別

    上傳時間: 2020-04-07

    上傳用戶:如拷貝般復(fù)制

  • CAZAC序列MATLAB實現(xiàn)

    Chu序列、Bjork序列、P序列實現(xiàn) %   cazac_creat 生成cazac序列 %   signal_length:生成cazac信號長度 N %   cazac_seq:生成的cazac序列 %   sig_num:序列個數(shù)  M %   k=signal_length-1; %   seq_switch: %   1:Chu M<=N-1 %   2:P M<=N %   3:Bjorck M<=N

    標簽: MATLAB CAZAC 序列

    上傳時間: 2021-11-11

    上傳用戶:BY1902082

  • 第三代半導(dǎo)體GaN功率開關(guān)器件的發(fā)展現(xiàn)狀及面臨的挑戰(zhàn)

    作者:何亮,劉揚論文摘要:氮 化 鎵 (G a N )材 料 具 有 優(yōu) 異 的 物 理 特 性 ,非 常 適 合 于 制 作 高 溫 、高 速 和 大 功 率 電 子 器 件 ,具 有 十 分 廣 闊 的 市場前景 。 S i襯 底 上 G a N 基 功 率 開 關(guān) 器 件 是 目 前 的 主 流 技 術(shù) 路 線 ,其 中 結(jié) 型 柵 結(jié) 構(gòu) (p 型 柵 )和 共 源 共 柵 級 聯(lián) 結(jié) 構(gòu) (C asco de)的 常 關(guān) 型 器 件 已 經(jīng) 逐 步 實 現(xiàn) 產(chǎn) 業(yè) 化 ,并 在 通 用 電 源 及 光 伏 逆 變 等 領(lǐng) 域 得 到 應(yīng) 用 。但 是 鑒 于 以 上 兩 種 器 件 結(jié) 構(gòu) 存 在 的 缺 點 ,業(yè) 界 更 加 期 待 能 更 充 分 發(fā) 揮 G a N 性能的 “ 真 ” 常 關(guān) M 0 S F E T 器件。而 GaN M 0 S F E T 器件的全面實用 化 ,仍 然 面 臨 著 在 材 料 外 延 方 面 和 器 件 穩(wěn) 定 性 方 面 的 挑 戰(zhàn) 。

    標簽: 第三代半導(dǎo)體 GaN 功率開關(guān)器件

    上傳時間: 2021-12-08

    上傳用戶:XuVshu

主站蜘蛛池模板: 定陶县| 固镇县| 铜川市| 泾阳县| 江陵县| 长治县| 岑巩县| 新泰市| 南投市| 泌阳县| 乐清市| 平阴县| 皋兰县| 兴仁县| 三明市| 德江县| 东乡族自治县| 栾川县| 确山县| 图们市| 苏尼特左旗| 宜丰县| 商丘市| 犍为县| 嘉鱼县| 东兴市| 留坝县| 丹凤县| 同江市| 衡水市| 德州市| 云浮市| 托里县| 拜城县| 文安县| 威宁| 堆龙德庆县| 内乡县| 磐石市| 白河县| 巢湖市|