| 记录编号 | 611310 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 3046.枚举子集 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.015 s | ||
| 提交时间 | 2026-01-27 14:25:55 | 内存使用 | 3.67 MiB | ||
#include<bits/stdc++.h>
using namespace std;
int n;
void DFS(int x,int y)
{
if(x+y-1>n) return;
for(int i=1;i<=y;++i)
cout<<x+i-1<<" ";
cout<<endl;
}
int main()
{
freopen("subset.in","r",stdin);
freopen("subset.out","w",stdout);
cin>>n;
for(int i=1;i<=n;++i)
for(int j=1;j<=n;++j)
DFS(i,j);
return 0;
}