Submission #1173305

#TimeUsernameProblemLanguageResultExecution timeMemory
1173305NomioEsej (COCI15_esej)C++20
80 / 80
9 ms3260 KiB
#include<bits/stdc++.h>
using namespace std;
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int a, b;
	cin >> a >> b;
	vector<string> v;
	for(int i = 1; i < (1 << 16); i++) {
		string s = "";
		for(int j = 0; j < 16; j++) {
			if((i >> j) % 2 == 1) s += (char)(j + 'a'); 
		}
		if(s.size() <= 15) v.push_back(s);
	}
	for(int i = 0; i < (b + 1) / 2; i++) {
		cout << v[i] << ' ';
	}
	for(int i = 0; i < b - (b + 1) / 2; i++) {
		cout << v[i] << ' ' ;
	}
	cout << '\n';
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...