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 |
不是6层循环暴搜吗?for(i=0;i<k;i++) scanf("%d",&a[i]); for(a1=0;a1<k-5;a1++) for(a2=a1+1;a2<k-4;a2++) for(a3=a2+1;a3<k-3;a3++) for(a4=a3+1;a4<k-2;a4++) for(a5=a4+1;a5<k-1;a5++) for(a6=a5+1;a6<k;a6++) printf("%d %d %d %d %d %d\n",a[a1],a[a2],a[a3],a[a4],a[a5],a[a6]); Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator