文章
72
粉丝
142
获赞
5
访问
57.5k
#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
typedef struct Lnode {
int data;
struct Lnode* next;
}Lnode, *Linklist;
bool cmp(int a, int b) {
return a > b;
}
void create(Linklist& L, int a[], int n) {
for (int i = 0; i < n; i++) {
Lnode* s = (Lnode*)malloc(sizeof(Lnode));
s->data = a[i];
s->next = L->next;
L->next = s;
}
}
int main() {
int m;
cin >> m;
Linklist L1 = (Lnode*)malloc(sizeof(Lnode));
L1->next = NULL;
int a[105];
int b[105];
for (int i = 0; i < m; i++) {
...
登录后发布评论
3
1 2 3
2
3 4