使用数组的方法,解决Josephus问题
摘要:void main() //使用数组的方法,解决Josephus问题-----还没搞懂{const int num=20;int interval;int a[num];for(int x=0;x<num;x++)a[x]=x+1;cout<<"please input the interval:";cin>>interval;for(int j=0;j<num...
阅读全文
posted @
2008-10-31 16:48
无痕的泪
阅读(526)
推荐(0)