Submission #1173302

#TimeUsernameProblemLanguageResultExecution timeMemory
1173302nuutsnoyntonEsej (COCI15_esej)C++20
0 / 80
102 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> 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() == 5) 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...