| RACSODFACFGOperations: Reg, CFPDAReductions: K, WP, CFG, NP, SATANTLR: lex, synExams | log in, register, become guest |
+---+---+---+---+---+---+---+ +---+---+---+---+---╔═══╗---+
¦ ¦ ¦ ¦ ¦ 2 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ 2 ║ ║ ¦
+---+---+---+---+---+---+---+ +---+---+---+---╔═══╝---╚═══╗
¦ ¦ ¦ ¦ ¦ ¦ ¦ 3 ¦ ¦ ¦ ¦ ¦ ║ ¦ ¦ 3 ║
+---+---+---+---+---+---+---+ +---╔═══════════╝---+---╔═══╝
¦ ¦ 2 ¦ 1 ¦ ¦ ¦ ¦ ¦ ¦ ║ 2 ¦ 1 ¦ ¦ ¦ ║ ¦
+---+---+---+---+---+---+---+ +---║---+---+---╔═══════╝---+
¦ ¦ ¦ ¦ ¦ ¦ 1 ¦ 0 ¦ ¦ ║ ¦ ¦ ║ ¦ 1 ¦ 0 ¦
+---+---+---+---+---+---+---+ +---╚═══════════╝---+---+---+
¦ 0 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ 0 ¦ ¦ ¦ ¦ ¦ ¦ ¦
+---+---+---+---+---+---+---+ +---+---+---+---+---╔═══╗---+
¦ ¦ ¦ ¦ ¦ ¦ 3 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ║ 3 ║ ¦
+---+---+---+---+---+---+---+ +---+---+---+---╔═══╝---╚═══╗
¦ ¦ ¦ ¦ ¦ 3 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ║ 3 ¦ ¦ ║
+---+---+---+---+---+---+---+ +---+---+---+---╚═══════════╝
board: array of array of intThe input is an matrix. Each of its cells either has a value in , or it has the value to denote that the cell is empty.
segments: array of array [2] of struct {
r: int
c: int
}
The output is a list of pairs of adjacent cells. Each cell is identified
with its coordinates r (row) and c (column). Each of the
pairs of adjacent cells denotes that the segment adjacent to both cells
is part of a cycle.
|
|