Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
145409 冼俊烨 邮票面值问题 C++ 解答错误 0 0 MS 248 KB 354 2024-05-05 08:06:01

Tests(0/4):


//6个数排列出所有组合 #include <bits/stdc++.h> using namespace std; int f[10]; void Dfs(int k,int n) { if(k>5) { for(int i=1; i<=5; i++) cout<<f[i]<<' '; cout<<endl; } else for(int i=f[k-1]+1; i<=n; i++) { f[k]=i; Dfs(k+1,n); } } int main() { Dfs(1,8); return 0; }


测评信息: