답안 #469369

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
469369 2021-08-31T15:48:42 Z ala2 Esej (COCI15_esej) C++14
40 / 80
76 ms 8920 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n,m;
int g=0;
char v;
map<string ,int>mm;
void f(int i,char w,string s)
{
    if(g==n)
        return ;
    if(w>'z')
        return ;

    if(i==5+3)
    {

           if(mm[s])
            return ;
        cout<<s<<" ";
        mm[s]=1;
        g++;
        return ;
    }
    string c=s;
    c+=w;
    f(i+1,w,c);
    while(w<'z'){
    c.pop_back();
    w++;
    c+=w;
    f(i+1,w,c);
    }



}
signed main()
{

    cin>>n>>m;
    n=min(n,m);
    v='a';
    f(0,'a',"");
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Incorrect 0 ms 204 KB Output isn't correct
5 Correct 3 ms 716 KB Output is correct
6 Incorrect 7 ms 1100 KB Output isn't correct
7 Incorrect 7 ms 1100 KB Output isn't correct
8 Correct 74 ms 7212 KB Output is correct
9 Correct 76 ms 8920 KB Output is correct
10 Incorrect 0 ms 204 KB Output isn't correct