| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54617 | 陈万瑄 | 彩票 | C++ | Accepted | 100 | 8 MS | 252 KB | 400 | 2022-07-29 16:33:15 |
#include<bits/stdc++.h> using namespace std; int k,s[14]; int ans[7]; void show(){ for(int i=1;i<=6;i++) cout<<ans[i]<<" "; cout<<endl; } void dfs(int cnt,int pre){ if(cnt==7){ show(); return; } for(int i=pre+1;i<=k;i++){ ans[cnt]=s[i]; dfs(cnt+1,i); } } int main(){ while(cin>>k,k){ for(int i=1;i<=k;i++) cin>>s[i]; dfs(1,0); cout<<endl; } return 0; }