Skip to main content
Commonmark migration
Source Link

###A second example test case

A second example test case

###A second example test case

A second example test case

Tweeted twitter.com/StackCodeGolf/status/991170737523347456
added 26 characters in body
Source Link
Jonathan Allan
  • 115.5k
  • 8
  • 68
  • 293

Should yield one of these three coordinate lists identifying an area six rectangles:

[1, 0, 2, 2]
[1, 0, 3, 1]
[3, 2, 5, 3]

(...not [1, 0, 3, 1] or [3, 2, 5, 3] both of which also have area six)

Should yield

[1, 0, 2, 2]

(...not [1, 0, 3, 1] or [3, 2, 5, 3] both of which also have area six)

Should yield one of these three coordinate lists identifying an area six rectangles:

[1, 0, 2, 2]
[1, 0, 3, 1]
[3, 2, 5, 3]

Less restrictive about rectangles with same area. Fixing how to calculate area.
Source Link
danihp
  • 361
  • 3
  • 7
  • The goal is to foundfind the "first" valid rectangle or one of the rectangles with the largest area, calculated by area(right-left+1)*(bottom-top+1)
  • If there are multiple rectangles with the same maximum area, output any one. Optionally the one with (top coordinate, left coordinate, bottomright coordinate, rightbottom coordinate) lexicographically smallest.
  • To calculate area for (1,0) to (4,3) you do (4-1)*(3-0).
  • Rectangles must have edges parallel to the board's edge.
  • The board has, at least, one non-zero area rectangle.
  • Each letter is a printable ASCII char from A to Z (both included).
  • The goal is to found the "first" valid rectangle with the largest area
  • If there are multiple rectangles with the same maximum area, output one with (top coordinate, left coordinate, bottom coordinate, right coordinate) lexicographically smallest.
  • To calculate area for (1,0) to (4,3) you do (4-1)*(3-0).
  • Rectangles must have edges parallel to the board's edge.
  • The board has, at least, one non-zero area rectangle.
  • Each letter is a printable ASCII char from A to Z (both included).
  • The goal is to find the rectangle or one of the rectangles with the largest area, calculated by (right-left+1)*(bottom-top+1)
  • If there are multiple rectangles with the same maximum area, output any one. Optionally the one with (top coordinate, left coordinate, right coordinate, bottom coordinate) lexicographically smallest.
  • Rectangles must have edges parallel to the board's edge.
  • Each letter is a printable ASCII char from A to Z (both included).
added 310 characters in body
Source Link
Jonathan Allan
  • 115.5k
  • 8
  • 68
  • 293
Loading
added 53 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
Removed MATLAB specific line. It says "matrix" in the first paragraph, and that covers it.
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 140
  • 304
Loading
deleted 21 characters in body
Source Link
user202729
  • 17.6k
  • 2
  • 39
  • 71
Loading
added 108 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
added 213 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
Made some calrifications feel free to roll back.
Source Link
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697
Loading
added 60 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
added 61 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
deleted 675 characters in body
Source Link
danihp
  • 361
  • 3
  • 7
Loading
edited tags
Link
danihp
  • 361
  • 3
  • 7
Loading
Source Link
danihp
  • 361
  • 3
  • 7
Loading