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
Copy file name to clipboardExpand all lines: README.md
+12-17Lines changed: 12 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ grid are referenced using a pair of 0-based coordinates [r, c] , denoting respec
16
16
column of the cell.
17
17
18
18
Each cell of the pizza contains either:
19
-
- mushroom, represented in the input file as M ; or
19
+
- mushroom, represented in the input file as M
20
20
- tomato, represented in the input file as T
21
21
22
22
Slice
@@ -35,12 +35,12 @@ lines terminated with a single ‘\n’ character at the end of each line (UNIX-
35
35
File format
36
36
The file consists of:
37
37
- one line containing the following natural numbers separated by single spaces:
38
-
- R (1 ≤ R ≤ 1000) is the number of rows,
39
-
- C (1 ≤ C ≤ 1000) is the number of columns,
40
-
- L (1 ≤ L ≤ 1000) is the minimum number of each ingredient cells in a slice,
38
+
- R (1 ≤ R ≤ 1000) is the number of rows
39
+
- C (1 ≤ C ≤ 1000) is the number of columns
40
+
- L (1 ≤ L ≤ 1000) is the minimum number of each ingredient cells in a slice
41
41
- H (1 ≤ H ≤ 1000) is the maximum total number of cells of a slice
42
42
43
-
Google 2017, All rights reserved.
43
+
Google 2017, All rights reserved.
44
44
45
45
R lines describing the rows of the pizza (one after another). Each of these lines contains C
46
46
characters describing the ingredients in the cells of the row (one cell after another). Each character
@@ -57,25 +57,20 @@ Example input file.
57
57
Submissions
58
58
File format
59
59
The file must consist of:
60
-
- one line containing a single natural number S (0 ≤ S ≤ R × C) , representing the total number of
61
-
slices to be cut,
62
-
- U lines describing the slices. Each of these lines must contain the following natural numbers
63
-
separated by single spaces:
64
-
- r 1 , c 1 , r 2 , c 2 describe a slice of pizza delimited by the rows r (0 ≤ r1,r2 < R, 0 ≤ c1, c2 < C) 1 and
65
-
r 2 and the columns c 1 and c 2 , including the cells of the delimiting rows and columns. The
66
-
rows ( r 1 and r 2 ) can be given in any order. The columns ( c 1 and c 2 ) can be given in any order too.
67
-
60
+
- one line containing a single natural number S (0 ≤ S ≤ R × C) , representing the total number of slices to be cut,
61
+
- U lines describing the slices. Each of these lines must contain the following natural numbers separated by single spaces:
62
+
- r 1 , c 1 , r 2 , c 2 describe a slice of pizza delimited by the rows r (0 ≤ r1,r2 < R, 0 ≤ c1, c2 < C) 1 and r 2 and the columns c 1 and c 2 , including the cells of the delimiting rows and columns. The rows ( r 1 and r 2 ) can be given in any order. The columns ( c 1 and c 2 ) can be given in any order too.
68
63
69
64
Example
70
65
3
71
66
0 0 2 1
72
67
0 2 2 2
73
68
0 3 2 4
74
69
3 slices.
75
-
First slice between rows (0,2) and columns (0,1).
76
-
Second slice between rows (0,2) and columns (2,2).
77
-
Third slice between rows (0,2) and columns (3,4).
78
-
Example submission file.
70
+
-First slice between rows (0,2) and columns (0,1).
71
+
-Second slice between rows (0,2) and columns (2,2).
72
+
-Third slice between rows (0,2) and columns (3,4).
0 commit comments