Submission #95186

#TimeUsernameProblemLanguageResultExecution timeMemory
95186MohamedAhmed0Esej (COCI15_esej)C++14
80 / 80
9 ms1272 KiB
#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<<" "; cnt++; if(cnt == stop) return 0 ; } while(next_permutation(ans.begin() , ans.end())); }
#Verdict Execution timeMemoryGrader output
Fetching results...