// source problem :
#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define int long long
#define lb lower_bound
#define ub upper_bound
#define MASK(i) (1LL << (i))
const int inf = 1e18;
void ckmax(int& f, int s)
{
f = (f > s ? f : s);
}
void ckmin(int& f, int s)
{
f = (f < s ? f : s);
}
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int l, r;
cin >> l >> r;
vector<int> a(15);
for (int i = 0; i < r; i++) {
if (i) cout << ' ';
for (int j = 0; j < 15; j++) cout << (char)('a' + a[j]);
a[14]++;
int p = 14;
while (a[p] == 26) {
a[p] = 0;
p--;
a[p]++;
}
}
cout << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |