摘要: 1 #include <stdio.h> 2 #include <string.h> 3 4 typedef long long int lli; 5 6 lli power_digui(lli m, lli n) // 递归版 7 { 8 if (n == 0) // 任何数的0次方为1 9 re 阅读全文
posted @ 2020-03-26 19:16 sqdtss 阅读(135) 评论(0) 推荐(0) 编辑
摘要: // 数学方法证明 设ak为第k天学习的时间,则: a1 + a2 + … + a37 <= 60 且ak >= 1 k = 1, 2 …, 37 则1<=b1<b2<…<b37<=60考察序列b1, b2, …,b37, b1+13, b2+13,….,b37+13此序列共74项,每项均为1~73 阅读全文
posted @ 2020-03-26 16:11 sqdtss 阅读(1602) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 定义栈的结构体 5 typedef struct S 6 { 7 int data; 8 struct S *next; 9 } S, *SList; 10 11 // 初始化 12 void ini 阅读全文
posted @ 2020-03-26 16:08 sqdtss 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 链队列结构体 5 typedef struct Queue 6 { 7 int data; 8 struct Queue *next; 9 } Queue, *QList; 10 // 队列指针结构体 阅读全文
posted @ 2020-03-26 16:05 sqdtss 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 typedef struct node 5 { 6 int data; 7 node *next; 8 } node; 9 10 // 插入数组元素值 11 node *insert(node *L, in 阅读全文
posted @ 2020-03-26 15:09 sqdtss 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 二叉排序树数据结构 5 typedef struct BST 6 { 7 int data; // 数据部分 8 struct BST *lchild, *rchild; // 左右孩子 9 } BS 阅读全文
posted @ 2020-03-26 14:48 sqdtss 阅读(214) 评论(0) 推荐(0) 编辑