# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
469368 |
2021-08-31T15:48:05 Z |
ala2 |
Esej (COCI15_esej) |
C++14 |
|
0 ms |
0 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(m[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',"");
}
Compilation message
esej.cpp: In function 'void f(long long int, char, std::string)':
esej.cpp:18:16: error: no match for 'operator[]' (operand types are 'long long int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
18 | if(m[s])
| ^