#include <bits/stdc++.h>
using namespace std;
int main()
{
int a , b ;
cin>>a>>b ;
string ans = "" ;
for(int i = 0 ; i < 9 ; ++i)
ans += (char)('a' + i) ;
int stop = max(a , (b+1)/2);
int cnt = 0 ;
do
{
cout<<ans<<"\n";
cnt++;
if(cnt == stop)
return 0 ;
}
while(next_permutation(ans.begin() , ans.end()));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
128 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
5 |
Incorrect |
3 ms |
380 KB |
Output isn't correct |
6 |
Incorrect |
3 ms |
504 KB |
Output isn't correct |
7 |
Incorrect |
5 ms |
892 KB |
Output isn't correct |
8 |
Incorrect |
7 ms |
1148 KB |
Output isn't correct |
9 |
Incorrect |
9 ms |
1404 KB |
Output isn't correct |
10 |
Incorrect |
5 ms |
892 KB |
Output isn't correct |