Submission #1173303

#TimeUsernameProblemLanguageResultExecution timeMemory
1173303nuutsnoyntonEsej (COCI15_esej)C++20
80 / 80
18 ms15872 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> v;
	
	for ( i = 0; i < 26; i ++) {
		string str = string(1,'a' + i);
		v.push(str);
	}
	r = 0;
	while(1) {
		string str = v.front();
		v.pop();
		if (str.size() == 4) break;
		for (j =0; j < 26; j ++) {
			string str1 = str + char(j + 'a');
			v.push(str1);
		}
		r ++;
	}
	r = 0;
	for (i = 0; i < y; i ++) {
		cout << v.front() << " ";
		v.pop();
	}
	cout << "\n";
	
}
#Verdict Execution timeMemoryGrader output
Fetching results...