Files
project_euler/82/main.ua
2025-09-22 13:45:53 +02:00

24 lines
479 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# project euler 82
$ 131 & 673 & 234 & 103 & 18
$ 201 & 96 & 342 & 965 & 150
$ 630 & 803 & 746 & 422 & 111
$ 537 & 699 & 497 & 121 & 956
$ 805 & 732 & 524 & 37 & 331
≡◇(⋕°/$"_ & _") ⊜□⊸≠@\n
ε ← # parsed example problem input
# ? cost-matrix
Sol ← /↧≡⌟(
+⋅⊙⊡◡(
⊢path(
⤚⬚∞⊡ +[0_1 1_0 ¯1_0] ¤
| /↥=⊙(-1⧻)⊣⍉)
)
) ⍉˜⊟0°⊏
⍤⤙≍ 994 Sol ε
&fras "cost-matrix.txt"
⊜(⊜⋕⊸≠@,)⊸≠@\n
Sol