1 Star 0 Fork 0

OuroborosInc / OuroborosOJ-2021b

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
6.2 F 313 Bytes
一键复制 编辑 原始数据 按行查看 历史
vulcan626 提交于 2022-06-16 09:18 . Data-Structure-main
#include<iostream>
using namespace std;
char ch[27]="aaaaaaaaaaaaaaaaaaaaaaaaaa";
void dic(int n,int m)
{
int i,j;
if(m==0)
{
for(i=0;i<n;i++)
cout<<ch[i];
cout<<endl;
}
else
{
for(ch[n-m]='a',j=0;j<n;j++,ch[n-m]++)
dic(n,m-1);
}
}
int main()
{
int a,b;
cin>>a;
b=a;
dic(a,b);
return 0;
}
C++
1
https://gitee.com/ouroborosinc/OuroborosOJ-2021b.git
git@gitee.com:ouroborosinc/OuroborosOJ-2021b.git
ouroborosinc
OuroborosOJ-2021b
OuroborosOJ-2021b
master

搜索帮助