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

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

?|?°?£?¥???′(ch????ng)?¥???§(n???¨i)?¥???1?ˉ?????ˉ?????¢???????????§???±?¤?????§???????????§?????§?????§?????¨?????¤????

  • //顏色初始化 if(!has_colors() || start_color() == ERR){ endwin() printf("Terminal does not su

    //顏色初始化 if(!has_colors() || start_color() == ERR){ endwin() printf("Terminal does not support color.\n") exit(1) } init_pair(1, COLOR_GREEN, COLOR_BLACK) init_pair(2, COLOR_RED, COLOR_BLACK) init_pair(3, COLOR_CYAN, COLOR_BLACK) init_pair(4, COLOR_WHITE, COLOR_BLACK) init_pair(5, COLOR_MAGENTA, COLOR_BLACK) init_pair(6, COLOR_BLUE, COLOR_BLACK) init_pair(7, COLOR_YELLOW, COLOR_BLACK) //寫字符串 for(i = 1 i <= 7 i++) { attron(COLOR_PAIR(i)) printw("color pair d in normal mode\n", i) } for(i = 1 i <= 7 i++) { attron(COLOR_PAIR(i) | A_BLINK | A_UNDERLINE) printw("color pair d in normal mode\n", i) }

    標(biāo)簽: start_color has_colors Terminal endwin

    上傳時(shí)間: 2014-01-14

    上傳用戶:vodssv

  • g a w k或GNU awk是由Alfred V. A h o

    g a w k或GNU awk是由Alfred V. A h o,Peter J.We i n b e rg e r和Brian W. K e r n i g h a n于1 9 7 7年為U N I X創(chuàng)建的a w k編程語言的較新版本之一。a w k出自創(chuàng)建者姓的首字母。a w k語言(在其所有的版本中)是一種具有很強(qiáng)能力的模式匹配和過程語言。a w k獲取一個(gè)文件(或多個(gè)文件)來查找匹配特定模式的記錄。當(dāng)查到匹配后,即執(zhí)行所指定的動(dòng)作。作為一個(gè)程序員,你不必操心通過文件打開、循環(huán)讀每個(gè)記錄,控制文件的結(jié)束,或執(zhí)行完后關(guān)閉文件。

    標(biāo)簽: V. Alfred GNU awk

    上傳時(shí)間: 2014-01-02

    上傳用戶:hwl453472107

  • 運(yùn)動(dòng)會(huì)源代碼

    #include <malloc.h>       #include <stdio.h>       #include <stdlib.h>       #include <string.h>       #define NULL 0      #define MaxSize 30          typedef struct athletestruct /*運(yùn)動(dòng)員*/     {         char name[20];          int score; /*分?jǐn)?shù)*/         int range; /**/         int item; /*項(xiàng)目*/     }ATH;     typedef struct schoolstruct /*學(xué)校*/     {         int count; /*編號(hào)*/         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)動(dòng)項(xiàng)目序號(hào) (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)存在請(qǐng)選擇其他的數(shù)字\n");                     goto Is_Game_DoMain;                 }             }         }         pafirst = pafirst + 1;         if ( overgame > ntsp )         {             printf("\n項(xiàng)目不存在");             printf("\n請(qǐng)重新輸入");             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輸入序號(hào) of the NO.%d (0<x<=%d): ",i,nsc);                 scanf("%d",&serial);         if ( serial > nsc )          {             printf("\n超過學(xué)校數(shù)目,請(qǐng)重新輸入");             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)動(dòng)項(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號(hào)學(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)動(dòng)會(huì)結(jié)果:\n\n學(xué)校編號(hào)\t男運(yùn)動(dòng)員成績\t女運(yùn)動(dòng)員成績\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)動(dòng)會(huì)分?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

  • c語言算法排序

    1.Describe a Θ(n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x. (Implement exercise 2.3-7.) #include<stdio.h> #include<stdlib.h> void merge(int arr[],int low,int mid,int high){      int i,k;      int *tmp=(int*)malloc((high-low+1)*sizeof(int));      int left_low=low;      int left_high=mid;      int right_low=mid+1;      int right_high=high;      for(k=0;left_low<=left_high&&right_low<=right_high;k++)      {      if(arr[left_low]<=arr[right_low]){                                        tmp[k]=arr[left_low++];                                        }      else{           tmp[k]=arr[right_low++];           } }             if(left_low<=left_high){                              for(i=left_low;i<=left_high;i++){                                                               tmp[k++]=arr[i];                                                               }                              }       if(right_low<=right_high){                              for(i=right_low;i<=right_high;i++)                                                                tmp[k++]=arr[i];                                                        }                              for(i=0;i<high-low+1;i++)                                                       arr[low+i]=tmp[i];       } void merge_sort(int a[],int p,int r){      int q;      if(p<r){              q=(p+r)/2;              merge_sort(a,p,q);              merge_sort(a,q+1,r);              merge(a,p,q,r);              }      } int main(){     int a[8]={3,5,8,6,4,1,1};     int i,j;     int x=10;     merge_sort(a,0,6);     printf("after Merging-Sort:\n");     for(i=0;i<7;i++){                      printf("%d",a[i]);                      }     printf("\n");     i=0;j=6;     do{                                    if(a[i]+a[j]==x){                                  printf("exist");                                  break;                                  }                  if(a[i]+a[j]>x)                                 j--;                  if(a[i]+a[j]<x)                                 i++;                       }while(i<=j);     if(i>j)              printf("not exist");     system("pause");     return 0;     }

    標(biāo)簽: c語言 算法 排序

    上傳時(shí)間: 2017-04-01

    上傳用戶:糖兒水嘻嘻

  • 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++){                 //計(jì)算下一個(gè)值     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]);     } } //求兩個(gè)向量差的二范數(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; }

    標(biāo)簽: C語言 編寫 迭代

    上傳時(shí)間: 2019-10-13

    上傳用戶:大萌萌撒

  • TCPIP詳解 卷2實(shí)現(xiàn)

    1.2 源代碼表示不考慮主題,列舉 15 000行源代碼本身就是一件難事。下面是所有源代碼都使用的文本格式:1.2.1 將擁塞窗口設(shè)置為13 8 7 - 3 8 8 這是文件t c p _ s u b r . c中的函數(shù)t c p _ q u e n c h。這些源文件名引用4 . 4 B S D - L i t e發(fā)布的文件。4 . 4 B S D在1 . 1 3節(jié)中討論。每個(gè)非空白行都有編號(hào)。正文所描述的代碼的起始和結(jié)束位置的行號(hào)記于行開始處,如本段所示。有時(shí)在段前有一個(gè)簡短的描述性題頭,對(duì)所描述的代碼提供一個(gè)概述。這些源代碼同4 . 4 B S D - L i t e發(fā)行版一樣,偶爾也包含一些錯(cuò)誤,在遇到時(shí)我們會(huì)提出來并加以討論,偶爾還包括一些原作者的編者評(píng)論。這些代碼已通過了 G N U縮進(jìn)程序的運(yùn)行,使它們從版面上看起來具有一致性。制表符的位置被設(shè)置成 4個(gè)欄的界線使得這些行在一個(gè)頁面中顯示得很合適。在定義常量時(shí),有些 # i f d e f語句和它們的對(duì)應(yīng)語句 # e n d i f被刪去(如:G A T E W A Y和M R O U T I N G,因?yàn)槲覀兗僭O(shè)系統(tǒng)被作為一個(gè)路由器或多播路由器 )。所有r e g i s t e r說明符被刪去。有些地方加了一些注釋,并且一些注釋中的印刷錯(cuò)誤被修改了,但代碼的其他部分被保留下來。這些函數(shù)大小不一,從幾行 (如前面的t c p _ q u e n c h)到最大11 0 0行(t c p _ i n p u t)。超過大約4 0行的函數(shù)一般被分成段,一段一段地顯示。雖然盡量使代碼和相應(yīng)的描述文字放在同一頁或?qū)﹂_的兩頁上,但為了節(jié)約版面,不可能完全做到。本書中有很多對(duì)其他函數(shù)的交叉引用。為了避免給每個(gè)引用都添加一個(gè)圖號(hào)和頁碼,書封底內(nèi)頁中有一個(gè)本書中描述的所有函數(shù)和宏的字母交叉引用表和描述的起始頁碼。因?yàn)楸緯脑创a來自公開的 4 . 4 B S D _ L i t e版,因此很容易獲得它的一個(gè)拷貝:附錄 B詳細(xì)說明了各種方法。當(dāng)你閱讀文章時(shí),有時(shí)它會(huì)幫助你搜索一個(gè)在線拷貝 [例如U n i x程序grep ( 1 )]。描述一個(gè)源代碼模塊的各章通常以所討論的源文件的列表開始,接著是全局變量、代碼維護(hù)的相關(guān)統(tǒng)計(jì)以及一個(gè)實(shí)際系統(tǒng)的一些例子統(tǒng)計(jì),最后是與所描述協(xié)議相關(guān)的 S N M P變量。全局變量的定義通常跨越各種源文件和頭文件,因此我們將它們集中到的一個(gè)表中以便于參考。這樣顯示所有的統(tǒng)計(jì),簡化了后面當(dāng)統(tǒng)計(jì)更新時(shí)對(duì)代碼的討論。卷 1的第2 5章提供了S N M P的所有細(xì)節(jié)。我們?cè)诒疚闹嘘P(guān)心的是由內(nèi)核中的 T C P / I P例程維護(hù)的、支持在系統(tǒng)上運(yùn)行的S N M P代理的信息。TCP IP詳解 卷1協(xié)議 :http://dl.21ic.com/download/tcpip-288223.html TCP IP詳解 卷2實(shí)現(xiàn) :http://dl.21ic.com/download/tcpip-288224.html TCPIP詳解卷三:TCP事務(wù)協(xié)議,HTTP,NNTP和UNIX域協(xié)議 :http://dl.21ic.com/download/tcpip-288225.html 

    標(biāo)簽: tcp-ip 實(shí)現(xiàn)

    上傳時(shí)間: 2022-07-27

    上傳用戶:

  • LinQ SQL TẤ N CÔ NG KIỂ U SQL INJECTION - TÁ C HẠ I VÀ PHÒ NG TR

    LinQ SQL TẤ N CÔ NG KIỂ U SQL INJECTION - TÁ C HẠ I VÀ PHÒ NG TRÁ NH

    標(biāo)簽: INJECTION SQL LinQ 7844

    上傳時(shí)間: 2013-12-15

    上傳用戶:eclipse

  • n個(gè)石頭(每相鄰兩個(gè)的距離是1米,最邊上石頭和岸的距離也是1米),禮物放在第m個(gè)石頭上,青蛙第i次跳2*i-1米.問能否得到禮物.(n>=49肯定能得到禮物,n<49,可以bfs或遞歸)

    n個(gè)石頭(每相鄰兩個(gè)的距離是1米,最邊上石頭和岸的距離也是1米),禮物放在第m個(gè)石頭上,青蛙第i次跳2*i-1米.問能否得到禮物.(n>=49肯定能得到禮物,n<49,可以bfs或遞歸)

    標(biāo)簽: 49 bfs gt lt

    上傳時(shí)間: 2013-12-30

    上傳用戶:linlin

  • 本章介紹L i n u x內(nèi)核是如何維護(hù)它支持的文件系統(tǒng)中的文件的.

    本章介紹L i n u x內(nèi)核是如何維護(hù)它支持的文件系統(tǒng)中的文件的.

    標(biāo)簽: 內(nèi)核 文件系統(tǒng)

    上傳時(shí)間: 2014-12-04

    上傳用戶:xmsmh

  • 程序存儲(chǔ)問題:設(shè)有n 個(gè)程序{1,2,…, n }要存放在長度為L的磁帶上。程序i存放在磁帶上的長度是Li

    程序存儲(chǔ)問題:設(shè)有n 個(gè)程序{1,2,…, n }要存放在長度為L的磁帶上。程序i存放在磁帶上的長度是Li ,1≤i≤n 程序存儲(chǔ)問題要求確定這n 個(gè)程序在磁帶上的一個(gè)存儲(chǔ)方案,使得能夠在磁帶上存儲(chǔ)盡可能多的程序。 編程任務(wù): 對(duì)于給定的n個(gè)程序存放在磁帶上的長度,編程計(jì)算磁帶上最多可以存儲(chǔ)的程序數(shù)。 數(shù)據(jù)輸入:由文件input.txt給出輸入數(shù)據(jù)。第一行是正整數(shù)n,表示文件個(gè)數(shù)。接下來的1 行中,有n 個(gè)正整數(shù),表示程序存放在磁帶上的長度。 結(jié)果輸出: input.txt output.txt 6 50 5 2 3 13 8 80 20

    標(biāo)簽: 程序 磁帶 長度 程序存儲(chǔ)

    上傳時(shí)間: 2013-12-20

    上傳用戶:dongqiangqiang

主站蜘蛛池模板: 岱山县| 金川县| 杭锦后旗| 延长县| 三亚市| 黄石市| 江西省| 永康市| 忻城县| 泰顺县| 治县。| 定结县| 宣化县| 黄梅县| 措勤县| 全州县| 巢湖市| 出国| 运城市| 康平县| 云和县| 津市市| 清丰县| 高台县| 敖汉旗| 金阳县| 通州市| 芮城县| 博客| 宜宾县| 客服| 蕲春县| 琼海市| 龙胜| 永善县| 忻城县| 香格里拉县| 肇州县| 定结县| 讷河市| 若尔盖县|