文章
12
粉丝
10
获赞
1
访问
5.5k
#include<iostream>
using namespace std;
struct Monkey
{
int Num;
struct Monkey*Next;
};
struct Monkey*GetMonkey(int n,int s)
{
struct Monkey*L = (struct Monkey*)malloc(sizeof(struct Monkey));
struct Monkey*p = L;p->Num = 1;
for(int i = 1;i<n;i++)
{
struct Monkey*temp = (struct Monkey*)malloc(sizeof(struct Monkey));
p->Next = temp;
p = p->Next;p->Num = i+1;
}
p->Next = L;
for(int i = 1;i<s;i++)L=L->Next;
return L;
}
void Print_Monkey(int n,int s,int m)
{
struct Monkey*L = GetMonkey(n,s);
struct Monkey*p = L;
//cout<<p-&g...
登录后发布评论
暂无评论,来抢沙发