Quantcast
Channel: Landmine Number V - Code Golf Stack Exchange
Viewing all articles
Browse latest Browse all 14

Answer by lyxal for Landmine Number V

$
0
0

Vyxal, 84 bitsv2, 10.5 bytes

3ḋ'1⋎⁰cnÞ⇧*;L

Try it Online!

Ports user1609012's python answer, so make sure you go upvote that. It's a much simpler answer than what I would have come up with.

Explained

3ḋ'1⋎⁰cnÞ⇧*;L­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏⁠‎⁡⁠⁣⁤‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌⁢⁢​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌⁢⁣​‎‎⁡⁠⁤⁡‏‏​⁡⁠⁡‌­3ḋ             # ‎⁡Get all combinations without replacement of length 3 from the landscape'        ;   # ‎⁢Keep only combinations n where:   1⋎          # ‎⁣  The combination with the middle letter removed⁰c        # ‎⁤  Is in the list of landmine flags          *    # ‎⁢⁡  And       nÞ⇧     # ‎⁢⁢  n is sorted in strict ascending order            L  # ‎⁢⁣Get the length of the valid combinations💎

Created with the help of Luminespire.


Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>