You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 26, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: competition/slime-chunk-farm/prob.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,20 @@ difficulty = 1
13
13
14
14
# ⛏️ Slime Chunk Farm
15
15
16
-
Steve would like to build a brand new Slime farm in his world. Since slimes only spawn in designated **Slime chunks** (16m*16m area where slimes can be found), Steve will need to find a suitable location for his farm.
16
+
Steve would like to build a brand new Slime farm in his world. Since slimes only spawn in designated **slime chunks** (16m by 16m area where slimes can be found), Steve will need to find a suitable location for his farm.
17
17
18
18
He's only gathered enough resources to convert 50 slime chunks into farms, and he would like for the chunks to be as close together as possible.
19
19
20
-
It's up to you to help steve find the **smallest area of land** that contains atleast **50 slime chunks**!
20
+
It's up to you to help Steve find the **smallest rectangular area of land**
21
+
that contains at least **50 slime chunks**!
21
22
22
-
## Input Format
23
-
The input is a 100x100 grid of characters. Each character represents a chunk, which is a 16x16 area of land. A Slime chunk is denoted by an "**S**" while normal chunks are denoted by "**.**"
23
+
## Input
24
24
25
+
The input is a 100x100 grid of characters.
26
+
Each character represents a chunk, which is a `16m x 16m` area of land.
27
+
A Slime chunk is denoted by the character "**S**" while other chunks are denoted by "**.**".
28
+
29
+
The following is a simplified example of such input, with a size of 5x5 instead of 100x100.
25
30
```text
26
31
...S.
27
32
.S...
@@ -30,5 +35,17 @@ The input is a 100x100 grid of characters. Each character represents a chunk, wh
30
35
.S.S.
31
36
```
32
37
33
-
## Output Format
34
-
Your output should be an integer representing the smallest area (in meters) in which 50 slime chunks could be found. (Remember that one chunk is (16*16) = 256 m^2)
38
+
## Output
39
+
40
+
Your output should be an integer representing the smallest rectangular area (in meters squared)
41
+
in which at least 50 slime chunks can be found.
42
+
(Remember that one chunk is `16*16 = 256 m^2`.)
43
+
44
+
If we consider a simplified version of this question where we are only looking for **4** slime chunks,
45
+
using the example above, the smallest area turns out to be **2048 m^2**,
46
+
being the 4x2 rectangle in the bottom-rightmost corner of the grid.
0 commit comments