Submission #1173290

#TimeUsernameProblemLanguageResultExecution timeMemory
1173290nuutsnoyntonEsej (COCI15_esej)C++20
16 / 80
350 ms131072 KiB
#include<bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
	ll n, m, s, r, x, y, i, j, ans, t;
	
	cin >> x >> y;
	queue < string > q;
	
	for ( i = 0; i < 26; i ++) {
		string str = string(1,'a' + i);
		q.push(str);
	}
	
	while(x --) {
		string str = q.front();
		cout << str << " ";
		q.pop();
		if ( q.empty()) {
			for (i = 0; i < 26; i ++) {
				string str1 = str + char(i + 'a');
				q.push(str1);
			}
		}
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...