约瑟夫环-源码
摘要:
#include using namespace std;typedef struct Node{ int num,pwd;//num为人员编号,pwd为人眼所处位置的值 struct Node *next;}LNode, *LinkList;void main(){ int i=1,m,n,j;//m为报数上限值,n为人数,j为输入的密码; cout>m; cout>n; LinkList head,p,pt; while(i>j; p->num=i; p->pwd=j; i++; } else { p->next=pt; ... 阅读全文
posted @ 2013-10-08 12:52 雪 狼 阅读(229) 评论(0) 推荐(0)
浙公网安备 33010602011771号