Doubt in construct the string problem : https://mirror.codeforces.com/problemset/problem/1335/B

Revision en2, by namr, 2020-04-19 15:48:02

In this question, https://mirror.codeforces.com/problemset/problem/1335/B, I am getting wrong answer for test case 2000 2000 26. My answer is coming out to be "bcdefghijklmnopqrstuvwxyzaaaaaaaaaaa......till 2000" and I think it's correct because we have to find a string which has a length 2000 and it's only substring will be of length 2000 as well and it should have 26 distinct letters. So what my code is doing is just getting all distinct letters at starting and then all the other position will have "a". Can anyone tell why am I getting wrong answer? EDIT : tried editing my code and now getting wrong answer on 13th test case, should i change my logic? you can have a look at my answer.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English namr 2020-04-19 15:48:02 138
en1 English namr 2020-04-19 13:51:54 638 Initial revision (published)