sarkarasm's blog

By sarkarasm, history, 5 weeks 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

»
5 weeks 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).

»
5 weeks 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).

»
5 weeks 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

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

    Thanks a lot!

    • »
      »
      »
      5 weeks 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.

      • »
        »
        »
        »
        5 weeks 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.

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

    Please help me too codeforces blog entry