Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @BLANC,validated by @Juanmv94,@BetaCorn and @FredericLocquet.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @BLANC,validated by @Juanmv94,@BetaCorn and @FredericLocquet.
If you have any issues, feel free to ping them.
I am failing the validator for “damaged map”.
I there something in particular about this case that should be taken into account?
I didn’t realize the original map could be more damaged than what the bombs could do.
hi BLANC can you please send the 4th and 6th validators,because i passed all the test but i’m failing those two validators
Not sure if BLANC will see your message as he/she was last seen on the forum in 2021.
The 4th validator contains a B-bomb at the corner, a B-bomb at the bottom edge, as well as vertically adjacent B-bombs, among other things.
The 6th validator contains diagonally adjacent B-bombs, and vertically adjacent A and B bombs, among other things.
I’ve run your code and found the issues it has shown under the 4th and 6th validators. Here are some custom cases based on those issues for your further debugging:
Custom case 1: Input
7
0000000
0000000
0000A00
0000000
00B0000
0000000
0000000
Custom case 1: Answer
0122222
0123332
0123A32
0133332
23B3222
0131111
0020000
Custom case 2: Input
7
0000000
0000000
A00B000
0000000
000B000
0000000
0000000
Custom case 2: Answer
2222000
3323000
A33B321
3323000
223B321
1113000
0002000
Custom case 3: Input
7
0000000
0000000
H00B0BB
0000000
000000B
000000B
0000000
Custom case 3: Answer
5555022
5555033
H55B3BB
5555033
555523B
555523B
0000003
And the 7th validator fails. I don’t see why.
Have you tried the above custom cases?
The statement should be more precise: “The grid initially contains cells labeled 0 along with several bombs of type A, H, or B.”
→ No! The map contains cells labeled from 0 to 9 (representing the initial damage in the zone) along with several bombs […]
I guess the “damaged map” test case was added afterwards
Thank you for reporting. The scenario was actually described in one of the constraints in Constraints section. I’ve moved that constraint to Goal section for clarity.
Missing tags
Loops
2D arrays
Recursion
OTOH, the requirements are kind of scattered here and there. I suggest to add a Note section to explicitly highlight these parts which are key information to solve the task:
Note that for each bomb, the bomb’s location is not replaced by a number .
Unlike the other bombs, the B-bomb will not explode unless it is within the shockwave of another exploding bomb.
However, in some cases, the place may already have felt the effect of other bombs before the grid bombs exploded. In this case the number of the cell will be different from 0 as soon as the grid is given.
If two effects from two different bombs are felt on a square, the stronger effect is recorded on the square
The last point above should also have mentioned the original grid of numbers should also be taken into consideration when computing the max and not just the effect of explosions from bombs A, B, H…
EDIT: the 3rd point above could be replaced and just mentioned the original grid inputs consists of numbers from 0-9 and A, B, H ONLY