随笔分类 -  数据结构

数据结构-9阶多项式
摘要:#include<stdio.h>#include<time.h>#include<math.h>clock_t start, stop;double duration;#define MAXN 10 //多项式最大项数,即多项式阶数+1 double f1(int n, double a[], d 阅读全文

posted @ 2018-05-25 18:29 Mint-Tremor 阅读(305) 评论(0) 推荐(0)

数据结构-多项式
摘要:#include<stdio.h>#include<time.h> clock_t start, stop; //clock_t是clock()函数返回的变量类型double duration; //记录被测函数运行时间,以秒为单位 int main2(){ //不在测试范围内的准备工作写在cloc 阅读全文

posted @ 2018-05-25 18:26 Mint-Tremor 阅读(152) 评论(0) 推荐(0)

数据结构-递归输出数字
摘要:#include<stdio.h> void PrintN(int N){ if (N) { PrintN(N-1); printf("%d\n", N); } return;} int main(){ int N; scanf("%d", &N); PrintN(N); return 0; } 阅读全文

posted @ 2018-05-25 18:24 Mint-Tremor 阅读(223) 评论(0) 推荐(0)

数据结构-顺序输出数字
摘要:#include<stdio.h> void PrintN(int N){ int i; for (i = 1; i <= N; i++) { printf("%d\n", i); } return;} int main(){ int N; scanf("%d", &N); PrintN(N); r 阅读全文

posted @ 2018-05-25 18:23 Mint-Tremor 阅读(176) 评论(0) 推荐(0)

导航