
C语言
Just so so so
沉默是金
展开
-
SDUT 2057 金牌 银牌 铜牌
/SDUT 2057 金牌 银牌 铜牌 记录这个题之前先发表一下感受,这个题的整体思路不难,但实现起来不是很容易,至少对我来说。 个人感觉,输出排名的函数有些困难,也没想到很好的方法,思路有些乱,也费了不少力气,但最后总算 提交成功了,特意记录一下。 做完这个题之后,我发现在链表中排序可以作为一个模板,这个功能做题时用到不少。收藏这个模板,在以后 做题时会省很多时间。 以下是源码:/ #inclu...原创 2019-07-18 19:26:21 · 283 阅读 · 0 评论 -
SDUT 1138 数据结构上机测试2-1:单链表操作A
//SDUT 1138 数据结构上机测试2-1:单链表操作A #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; void Show (struct Node *x); struct Node *Creat(int n); struct Node *Dele...原创 2019-07-19 14:35:45 · 200 阅读 · 0 评论 -
SDUT 1130 数据结构上机测试1:顺序表的应用
//数据结构上机测试1:顺序表的应用 //做完这个顺序表的题,感觉顺序表需要一种计算的思维 #include <stdio.h> #include <stdlib.h> int main () { int a[10001]; int top=0,p=0,q=0; int i,j,n; scanf ("%d",&n); a[0]=n; for (i=1;i<=n...原创 2019-07-19 14:39:55 · 259 阅读 · 0 评论 -
SDUT 2118
#include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; void show (struct Node *x); struct Node *Creat(struct Node *x,int n); int main () { struct Node head; i...原创 2019-07-22 16:06:00 · 129 阅读 · 0 评论 -
SDUT 2122单链表中重复元素的删除
//SDUT 2122 应该注意删除重复元素的算法,尤其注意删除最后一个 //测试的话,用数据 1 1 测试,通过了就基本可以了 #include <stdio.h> #include <stdlib.h> struct List { int data; struct List *next; }; void show (struct List *x);//显示链表信息 st...原创 2019-07-20 16:40:06 · 228 阅读 · 0 评论