文章
1
粉丝
180
获赞
1
访问
7.0k
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <map>
#include <string>
using namespace std;
typedef struct LNode {
    int data;
    LNode* next;
}* LinkList;
int DJ1015() {
    LinkList L;
    L = (LNode *)malloc(sizeof(LNode));
    L->next = NULL;
    LNode* s;
    LNode* p;
    for (int i = 1; i <= 5; i++) {//头插建表
        s = (LNode*)malloc(sizeof(LNode));
        scanf("%d", &s->data);
        s->next = L->next;
        L->next = s;
    }
    LNode* r = L->next->next;
    LNode* tmpL,*tmpr;
   &n...
登录后发布评论
暂无评论,来抢沙发