摘要: 1 #include<bits/stdc++.h> 2 #define MAX 100 3 typedef struct{ 4 int *Elem; 5 int length; 6 }SeqList; 7 void creat(SeqList &s) 8 { 9 s.Elem = (int*)mal 阅读全文
posted @ 2020-10-28 16:34 西南大学 阅读(178) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 #define MAX 100 3 typedef struct{ 4 int *Elem; 5 int length; 6 }SqList; 7 void Creat(SqList &s){ 8 s.Elem = (int*)malloc(M 阅读全文
posted @ 2020-10-25 16:37 西南大学 阅读(544) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define STACKMAX 100 4 typedef struct { 5 char *base; 6 char *top; 7 int stcaksize; 8 }Seqstack; 9 void cre 阅读全文
posted @ 2020-10-23 11:31 西南大学 阅读(106) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 void quickSort(int a[],int first,int end) 3 { 4 if(first==end) return; 5 int i = first,j = end,temp; 6 while(i<j){ 7 while 阅读全文
posted @ 2020-10-20 10:16 西南大学 阅读(88) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define LIST_INIT_SIZE 100 4 #define LISTINCREMENT 10 5 #define OK 1 6 #define ERROR 0 7 #define OVERFLOW - 阅读全文
posted @ 2020-09-25 10:42 西南大学 阅读(91) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define LIST_INIT_SIZE 100 4 #define LISTINCREMENT 10 5 #define OK 1 6 #define ERROR 0 7 #define OVERFLOW - 阅读全文
posted @ 2020-09-24 09:30 西南大学 阅读(127) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define TRUE 1 4 #define FALSE 0 5 #define OK 1 6 #define ERROR 0 7 #define INFEASIBLE -1 8 #define OVERFLO 阅读全文
posted @ 2020-09-17 16:34 西南大学 阅读(123) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int Max(int &e1,int &e2,int &e3){ 4 int max; 5 max = e1>e2?e1:e2; 6 max = max>e3?max:e3; 7 return max; 8 } 阅读全文
posted @ 2020-09-17 16:01 西南大学 阅读(150) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 void swap(int &n,int &m){ 3 int temp; 4 temp = n; 5 n = m; 6 m = temp; 7 } 8 int main(){ 9 int n,m,i,j; 10 printf("请输入两个数:\n"); 阅读全文
posted @ 2020-09-17 15:24 西南大学 阅读(51) 评论(0) 推荐(0)