猴子选大王(约瑟夫环问题),用链表实现的
#include
#include
#define n 20
#define m 5
typedef struct monkey
{
int num;
struct monkey *next;
} Monkey,*LINK;
int main()
{
LINK p,head,p2;
int i;
head=p=p2=(LINK)malloc(sizeof(Monkey));
for(i=1;i {
p=[......]