Skip to main content
deleted 309 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Or, if it turns out the output format is strict:

Japt -R, 7 bytes

ÆõwXÄ ¸ 

Try it

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Or, if it turns out the output format is strict:

Japt -R, 7 bytes

ÆõwXÄ ¸ 

Try it

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 
added 334 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Or, if it turns out the output format is strict:

Japt -R, 7 bytes

ÆõwXÄ ¸ 

Try it

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Or, if it turns out the output format is strict:

Japt -R, 7 bytes

ÆõwXÄ ¸ 

Try it

added 313 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

Japt, 5 bytes

Outputs a 2D-array.

õ@õwX 

Try it

õ@õwX :Implicit input of integer U õ :Range [1,U] @ :Map each X õ : Range [1,U] wX : Max of each with X 

Or, if outputting a 1D-array is allowed:

Japt, 4 bytes

õ ïw 

Try it

õ ïw :Implicit input of integer U õ :Range [1,U] ï :Cartesian product with itself w :Reduce each pair by Max 
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading