namr's blog

By namr, history, 5 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it