Skip to main content
added 935 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162

05AB1E, 26 25 bytes

D0*«¹v{R¬U¦X¹gn‚£`s<ì}0QP

Try it online!

Explanation to come after further golfing.Explanation

D0*«                       # extend the input list with as many zeroes as it has elements
    ¹v                     # len(input) times do:
      {R                   # sort in descending order
        ¬U¦X               # extract the first element of the list
            ¹gn‚           # pair it with len(input)^2
                £          # partition the list in 2 parts, the first the size of the 
                           # extracted element, the second containing the rest of the list
                 `         # split these list to stack (the second on top)
                  s<       # decrement the elements of the first list by 1
                    ì      # prepend it to the rest of the list
                     }     # end loop
                      0Q   # compare each element in the resulting list with 0
                        P  # reduce list by multiplication

05AB1E, 26 25 bytes

D0*«¹v{R¬U¦X¹gn‚£`s<ì}0QP

Try it online!

Explanation to come after further golfing.

05AB1E, 26 25 bytes

D0*«¹v{R¬U¦X¹gn‚£`s<ì}0QP

Try it online!

Explanation

D0*«                       # extend the input list with as many zeroes as it has elements
    ¹v                     # len(input) times do:
      {R                   # sort in descending order
        ¬U¦X               # extract the first element of the list
            ¹gn‚           # pair it with len(input)^2
                £          # partition the list in 2 parts, the first the size of the 
                           # extracted element, the second containing the rest of the list
                 `         # split these list to stack (the second on top)
                  s<       # decrement the elements of the first list by 1
                    ì      # prepend it to the rest of the list
                     }     # end loop
                      0Q   # compare each element in the resulting list with 0
                        P  # reduce list by multiplication
deleted 5 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162

05AB1E, 2626 25 bytes

Dg©Å0«®GD0*«¹v{R¬U¦X®n‚£`s<ìR¬U¦X¹gn‚£`s<ì}0QP

Try it online!Try it online!

Explanation to come after further golfing.

05AB1E, 26 bytes

Dg©Å0«®G{R¬U¦X®n‚£`s<ì}0QP

Try it online!

Explanation to come after further golfing.

05AB1E, 26 25 bytes

D0*«¹v{R¬U¦X¹gn‚£`s<ì}0QP

Try it online!

Explanation to come after further golfing.

Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162

05AB1E, 26 bytes

Dg©Å0«®G{R¬U¦X®n‚£`s<ì}0QP

Try it online!

Explanation to come after further golfing.