khulegu's blog

By khulegu, history, 5 years ago, In English

Here is the statement of problem B from the most recent contest (#571) for those who missed it. 571 — B

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

| Write comment?
»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

What was the test case 3? I did (a+1) (b+1) /6.

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

    If I'm not mistaken it likely was 4 4 or something like that.

    Your code would correctly produce 4 for that.

    However the expected answer according to the problem author's code would have been 3 which is clearly wrong as the following arrangement exists :

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

    Hi sir Can you please explain how you achieved that formula? Thank you.