摘要:
未测试是否正确.......#include stdio.h#include stdlib.h#include string.h#ifndef Huffman /*define all the function and data structure*/typedef int ElementType;typedef struct HeapStruct *HuffHeap;typedef struct HuffNode *Position;typedef struct HuffNode *HuffTree;/*define a huffman tree*/HuffHeap Initia 阅读全文
摘要:
此程序为次品.......#include stdio.h#include stdlib.h#define MAX_SIZE (100000)int list[500][500];int total;int n,m,Q,vir[10000],type[10000];struct stackrecord{ int row; int col; struct stackrecord *next;};typedef struct stackrecord *stack;stack s;typedef stack nodeplace;void mkempty(){ s=(stack)malloc( 阅读全文
摘要:
#include stdio.h#define MAX_SIZE (10000)struct node{ int qnum; int key;};typedef struct node listnode;listnode list[1000];int queue[1000];void checklist(int n,int m,int k,int q){ int i,j,t,min,times=0; int results[1000]; for(i=0;i1000;i++) results[i]=0; t=0; while(timesk) { min=MAX_SIZE; for 阅读全文