Submission #469361

# Submission time Handle Problem Language Result Execution time Memory
469361 2021-08-31T15:33:34 Z ala2 Esej (COCI15_esej) C++14
24 / 80
6 ms 716 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n,m;
int g=0;
char v;
void f(int i,char w,string s)
{
    if(g==n)
        return ;
    if(w>'z')
        return ;

    if(i==15)
    {
        cout<<s<<" ";
        g++;
        return ;
    }
    string c=s;
    c+=w;
    f(i+1,w,c);
    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',"");
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 1 ms 204 KB Output isn't correct
5 Correct 1 ms 332 KB Output is correct
6 Incorrect 2 ms 332 KB Output isn't correct
7 Incorrect 2 ms 332 KB Output isn't correct
8 Incorrect 6 ms 716 KB Output isn't correct
9 Incorrect 6 ms 716 KB Output isn't correct
10 Incorrect 0 ms 204 KB Output isn't correct