| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
帮忙改下错阿,菜鸟感谢#include<iostream> using namespace std; struct note { int num; struct note *next; } const int =10 struct note circle[n]; void main() { for (int i=0;i<n;i++) circle.num=i+1; for(i=0;i<n-2;i++) circle.next=&circle; circle[n-1]=&circle[0]; int m=8; struct note circle_tem=circle[0]; for(i=0;i<n-2;i++) { for(i=0;i<m;i++) circle_tem.next=circle_tem.next+1;// m+2 th number's adress (circle_tem.next-3)->next=circle_tem.next-1; circle_tem=*(circle_tem.next-1); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator