Skip to main content
added 72 characters in body
Source Link
emanresu A
  • 44.2k
  • 5
  • 100
  • 240

Vyxal, 1316 bytes

ƛ¦Þǔ;∑¦Ḣ:G/*⌈*⌈×*⁋

Try it Online!Try it Online!

Straightforward port of my Jelly answer, go see that explanation for a better idea of how it works. Jelly has some nicer builtins.

ƛ   ;            # Map each task to...
 ¦               # Cumulative sums (instants where a step will complete)
  Þǔ             # Untruth (a boolean list with 1s at those indices)
     ∑           # Reduce the whole thing by addition
      ¦Ḣ         # Get cumulative sums and remove the leading zero
        :G/      # Divide by the maximum
           *     # Multiply by the input
            ⌈    # Get the ceiling
             ×*⁋ # Make a bar graph

Vyxal, 13 bytes

ƛ¦Þǔ;∑¦Ḣ:G/*⌈

Try it Online!

Straightforward port of my Jelly answer, go see that explanation for a better idea of how it works. Jelly has some nicer builtins.

ƛ   ;         # Map each task to...
 ¦            # Cumulative sums (instants where a step will complete)
  Þǔ          # Untruth (a boolean list with 1s at those indices)
     ∑        # Reduce the whole thing by addition
      ¦Ḣ      # Get cumulative sums and remove the leading zero
        :G/   # Divide by the maximum
           *  # Multiply by the input
            ⌈ # Get the ceiling

Vyxal, 16 bytes

ƛ¦Þǔ;∑¦Ḣ:G/*⌈×*⁋

Try it Online!

Straightforward port of my Jelly answer, go see that explanation for a better idea of how it works. Jelly has some nicer builtins.

ƛ   ;            # Map each task to...
 ¦               # Cumulative sums (instants where a step will complete)
  Þǔ             # Untruth (a boolean list with 1s at those indices)
     ∑           # Reduce the whole thing by addition
      ¦Ḣ         # Get cumulative sums and remove the leading zero
        :G/      # Divide by the maximum
           *     # Multiply by the input
            ⌈    # Get the ceiling
             ×*⁋ # Make a bar graph
[Edit removed during grace period]
Source Link
emanresu A
  • 44.2k
  • 5
  • 100
  • 240
Source Link
emanresu A
  • 44.2k
  • 5
  • 100
  • 240

Vyxal, 13 bytes

ƛ¦Þǔ;∑¦Ḣ:G/*⌈

Try it Online!

Straightforward port of my Jelly answer, go see that explanation for a better idea of how it works. Jelly has some nicer builtins.

ƛ   ;         # Map each task to...
 ¦            # Cumulative sums (instants where a step will complete)
  Þǔ          # Untruth (a boolean list with 1s at those indices)
     ∑        # Reduce the whole thing by addition
      ¦Ḣ      # Get cumulative sums and remove the leading zero
        :G/   # Divide by the maximum
           *  # Multiply by the input
            ⌈ # Get the ceiling