sarkarasm's blog

By sarkarasm, history, 4 years ago, In English

Can anyone please help, what is wrong with my code?

  1. 86348075

Thanks in advance.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This is the most common mistake in this problem, I remember doing the same.

9 3
103102104

Correct answer is 103103103

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks a lot!

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      No problem! Just an advice: always try to run a bruteforce solution on small tests, this would show you that answer for 3 1 102 is not 222.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Thanks, man. But figuring out the appropriate testcases is the hard part. I guess it will get better with practice. I usually face problems when the sample cases are not strong.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Please help me too codeforces blog entry