Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
136350 | 沈子雯 | 组合问题 | C++ | 内存超限 | 0 | 1000 MS | 131304 KB | 293 | 2024-03-09 08:54:03 |
#include<bits/stdc++.h> using namespace std; int n,m,f[25],a[25]; void dfs(int t) { if(t>m) { for(int i=1;i<=m;i++) cout<<a[i]; cout<<endl; return ; } for(int i=a[t-1]+1;i<=n;i++) { a[t]=i; dfs(t++); } } int main() { cin>>n>>m; dfs(1); return 0; }