adorable__26's blog

By adorable__26, history, 5 weeks ago, In English

i have been stuck in this problem for 3 hours , can anyone solve it ? https://codeforces.com/contestInvitation/d77940d81af688faec2c767db7115bb22250532d

 
 
 
 
  • Vote: I like it
  • -11
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I Could have helped you but I am not allowed the view the contest - it may be private..

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by adorable__26 (previous revision, new revision, compare).

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

If m<2*n-1 then the answer is "-1"

Else there are several way to set the answer but the way I did is that First n-1 characters + nth character (m-2*n+2) times+ First n-1 characters in reverse

Let say

3

a b c

7

Ans is abccccba