贴上我的代码,哪位能帮忙看看?先谢过了
#include <bits/stdc++.h>
using namespace std;
void best_coder() {
int n;
cin >> n;
vector<char> c = {'a', 'b', 'c', 'd', 'e',
'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y',
'z'};
do {
for (int i = 0; i < min(26, n); ++i) {
cout << c[i];
}
n -= min(26, n);
} while (next_permutation(c.begin(), c.end()) && n > 0);
}
void happy_coder() {
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
best_coder();
return 0;
}