Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 64 characters in body
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 43 bytes

Þė↑ṘÞė↑

Try it Online! Try it Online!

And they said maximum by tail was useless! Now who's laughing! (me... It's me who's laughing)

Outputs [[x, y], item].

Explained

Þė↑Ṙ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌­Þė↑­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌­
Þė # ‎⁡Multidimensional enumeration
 ↑ # ‎⁢Maximum by tail 
 Ṙ # ‎⁣Reverse the list to meet the output format requirements
💎

Created with the help of Luminespire.

Vyxal, 4 bytes

Þė↑Ṙ

Try it Online!

And they said maximum by tail was useless! Now who's laughing! (me... It's me who's laughing)

Explained

Þė↑Ṙ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌­
Þė # ‎⁡Multidimensional enumeration
 ↑ # ‎⁢Maximum by tail 
 Ṙ # ‎⁣Reverse the list to meet the output format requirements
💎

Created with the help of Luminespire.

Vyxal, 3 bytes

Þė↑

Try it Online!

And they said maximum by tail was useless! Now who's laughing! (me... It's me who's laughing)

Outputs [[x, y], item].

Explained

Þė↑­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌­
Þė # ‎⁡Multidimensional enumeration
 ↑ # ‎⁢Maximum by tail 
💎

Created with the help of Luminespire.

deleted 393 characters in body
Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 42 bitsv2 , 5.254 bytes

fG~Þḟ"Þė↑Ṙ

Try it Online! Try it Online!

Bitstring:And they said maximum by tail was useless! Now who's laughing! (me... It's me who's laughing)

011101101010110011101000111101110111010000

Explained

fG~Þḟ"­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌­Þė↑Ṙ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌­
fGÞė # ‎⁡Multidimensional #enumeration
 ‎⁡Find the biggest item in# the‎⁢Maximum flattenedby inputtail 
 ~Þḟ  # ‎⁢Without popping, find‎⁣Reverse the multi-dimensionallist indexto ofmeet thatthe inoutput theformat inputrequirements
💎

Created with the help of Luminespire.

Vyxal, 42 bitsv2 , 5.25 bytes

fG~Þḟ"

Try it Online!

Bitstring:

011101101010110011101000111101110111010000

Explained

fG~Þḟ"­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌­
fG # ‎⁡Find the biggest item in the flattened input
 ~Þḟ # ‎⁢Without popping, find the multi-dimensional index of that in the input
💎

Created with the help of Luminespire.

Vyxal, 4 bytes

Þė↑Ṙ

Try it Online!

And they said maximum by tail was useless! Now who's laughing! (me... It's me who's laughing)

Explained

Þė↑Ṙ­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌­
Þė # ‎⁡Multidimensional enumeration
  # ‎⁢Maximum by tail 
  # ‎⁣Reverse the list to meet the output format requirements
💎

Created with the help of Luminespire.

Source Link
lyxal
  • 35.6k
  • 2
  • 69
  • 148

Vyxal, 42 bitsv2 , 5.25 bytes

fG~Þḟ"

Try it Online!

Bitstring:

011101101010110011101000111101110111010000

Explained

fG~Þḟ"­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌­
fG # ‎⁡Find the biggest item in the flattened input
 ~Þḟ # ‎⁢Without popping, find the multi-dimensional index of that in the input
💎

Created with the help of Luminespire.

AltStyle によって変換されたページ (->オリジナル) /