[Community Puzzle] 1010(1)

https://www.codingame.com/training/medium/10101

Send your feedback or ask for help here!

2 posts were merged into an existing topic: 1010(1) testcase 4

Hi and thanks for the puzzle. I must have misunderstood something. On paper, it looks to me like testcase 4 should give a result of 6 (5 rows + 1 column) after adding 3 squares. Testcase 4 shows an output of 3.
Please help me understand this. It did seem easy…:thinking:
Thanks!

You must find the maximum number of rows and columns being filled by adding 1 square.

In testcase 4, there are 3 possible spots, the first one allows to complete 1 row, the second one completes 2 rows and the third one fils 2 rows and one column.
Your total count is 6, but the maximum is 3.

1 Like

My bad.
Clearly, I was counting the total number, not the maximum.

I thought I read the specification carefully… :roll_eyes:

Thank you very much! :pray:

i have passed all test bu the score still at 75% , how can i know the stretch test that fails each time after submiting

Try testing your code by creating a custom case where width is smaller than height.

1 Like