大佬求调
#include <bits/stdc++.h>
using namespace std;
long long n, a[1140014] = {1};
void dfs(int x, int z) {
for (int i = a[x - 1]; i <= z; i++) {
if (i < n) {
a[x] = i;
z -= i;
}
if (!z) {
cout << a[1];
for (int j = 2; j <= x; j++) {
cout << "+" << a[j];
}
cout << endl;
return;
} else {
dfs(x + 1, z), z += i;
}
}
}
int main() {
cin >> n;
dfs(1, n);
return 0;
}