[Community Puzzle] Annihilation

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Westicles,validated by @UnicornP,@FredericLocquet and @Ayza.
If you have any issues, feel free to ping them.

I don’t mean to be rude, but the ā€œwrapping aroundā€ term can be unclear, is this possible to explain what it means (> and v go back to 0 at the end of the line, < and ^ go to max if they are on 0…) ?
Maybe I’mp the only concerned, but it did block me a bit.

1 Like

Isn’t that the definition of wrapping around (for me at least it is)?
I’m just wondering, what did you understand by that?

Maybe it is in fact confusing and I just got lucky and assumed correctly.

Well, i didnt understand it at all, now i know what it means, at least

If this is a question, the answer is first solution each time. ā€œWrapping aroundā€ means that. Same issue than me

1 Like

I wrote my solution and passed Test 1, Test 2 and Test 3.

Unfortunately Test 4, Test 5 and Test 5 fail because I end up in an endless loop because:

  • In Test 4 I have 1 arrow left so it steps around forever.
  • In Test 5 I have 7 arrows left which all move up or down on different columns so they will never end up in the same position.
  • In Test 6 I have 5 arrows left which all move left or right on different lines so they will never end up in the same position.

Obviously I made some mistake but because Test 4, 5 and 6 have so many arrows at the start it’s hard to find out where I went wrong. Does anyone have a hint or custom test case to help me find my error?

Luckily I found my error in my solution, it wasn’t an edge case but at some point I removed an arrow before checking if there maybe were others as well on the same position.

BTW, this may help others having doubts about a case like this:

image

Based on results from the tests I think result should be 2 and arrows are allowed to pass each other as long as they don’t end up on the exact same position.

1 Like

It is so funny to read a such complaint(when the statement of this puzzle is crystal clear) from the one who created Coding Games and Programming Challenges to Code Better puzzle which has tag a Reading the statement and 3 stars rating.

1 Like

Making a comment 2 years after, and to say this ! :sweat_smile:
I’m guessing you didn’t solve it. Too bad. Don’t hesitate to ask your questions in the dedicated forum :wink:

My only question is why didn’t you follow point 2 of this guide?

P.S. I don’t need anyone’s help to solve puzzles.

1 Like

Missing tags for

  • Loops

  • Hash

[Edit: Original poster has deleted their message.]

That’s not an appropriate comment. Would you please stop making similar comments in the future?

[Edit: Original poster has deleted their message.]

I’m a moderator. Your recent comment has violated the community guidelines. If this behaviour continues, you will be muted for at least one week, possibly longer. This is an official warning. Please reconsider how you engage with others on the forum.

1 Like

It seems to me that some solutions should not pass, as they mark the cells where a ā€˜collision’ occured with an ā€˜x’, ignoring such marked cells for further tests. If you have two pair of arrows annihilating each other at the same location, those solutions will not pass (and they should) ??

Is it tested somewhere ?

Example:

 0123456789
0..........
1.>..>.....
2.....^....
3..........
4..........
5.....^....
6.......... 

There will be two different ā€˜annihilations’ @cell(5,1), one at t+1, one at t+4 ??

Am I wrong ?

You aren’t wrong.

I’m not sure what solutions you referred to. I’ve just tested 10 of the published Python solutions and all of them passed your custom case correctly.

I’m coding in C++ so … so checked some C++ solutions…