- 博客(2)
- 收藏
- 关注
原创 求子集(递归)
现输入N,求(S)的子集。输入格式:一个整数即N。输出格式:输出所有子集,每个子集占一行。输入样例5输出样例()(3 )(2 )(2 3 )(1 )(1 3 )(1 2 )(1 2 3 )代码#include<iostream>using namespace std;int tag[1000];void Try(int a,int p){ if (p==a+1){ cout << "(";
2021-12-22 20:05:53
641
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人