| ||||||||||
| 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;
int main()
{
int n,i,a[13],j,k,l,m,p;
cin>>n;
while(n)
{
for(i=1;i<=n;i++)
cin>>a[i];
for(i=1;i<=n-5;i++)
for(j=i+1;j<=n-4;j++)
for(k=j+1;k<=n-3;k++)
for(l=k+1;l<=n-2;l++)
for(m=l+1;m<=n-1;m++)
for(p=m+1;p<=n;p++)
cout<<a[i]<<" "<<a[j]<<" "<<a[k]<<" "<<a[l]<<" "<<a[m]<<" "<<a[p]<<endl;
cin>>n;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator