| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 136317 | 林扬泉 | 组合问题 | C++ | Accepted | 100 | 4 MS | 244 KB | 425 | 2024-03-09 08:36:46 |
#include<bits/stdc++.h> using namespace std; const int N=30; int m,a[N],n; void dfs(int cur){ if(cur>m){ for(int i=1;i<=m;i++){ printf("%d",a[i]); } printf("\n"); return; } for(int i=a[cur-1]+1;i<=n;i++){ //printf("%d ",i); a[cur]=i; dfs(cur+1); } } int main() { scanf("%d%d",&n,&m); dfs(1); return 0; }