답안 #583860

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
583860 2022-06-26T10:32:06 Z MilosMilutinovic Esej (COCI15_esej) C++14
80 / 80
46 ms 25852 KB
/**
 *    author:  wxhtzdy
 *    created: 26.06.2022 12:23:35
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);  
  int a, b;
  cin >> a >> b;                   
  vector<vector<char>> s;
  for (char i = 'a'; i <= 'z'; i++) {
    for (char j = 'a'; j <= 'z'; j++) {
      for (char k = 'a'; k <= 'z'; k++) {
        for (char p = 'a'; p <= 'z'; p++) {
          s.push_back({i, j, k, p});
        }
      }
    }
  }
  function<void(vector<char>)> Print = [&](vector<char> c) {
    for (int i = 0; i < 4; i++) {
      cout << c[i];
    }
    cout << " ";
  };
  while (b--) {
    Print(s.back());
    s.pop_back();
  }                                                                  
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 25340 KB Output is correct
2 Correct 30 ms 25360 KB Output is correct
3 Correct 34 ms 25324 KB Output is correct
4 Correct 40 ms 25372 KB Output is correct
5 Correct 30 ms 25392 KB Output is correct
6 Correct 37 ms 25408 KB Output is correct
7 Correct 43 ms 25852 KB Output is correct
8 Correct 43 ms 25832 KB Output is correct
9 Correct 46 ms 25788 KB Output is correct
10 Correct 45 ms 25852 KB Output is correct