RACSODFACFGOperations: Reg, CFPDAReductions: K, WP, CFG, NP, SATANTLR: lexical, syntacticExams  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 $n\times m$ matrix. Each of its cells either has a value in $\{0,\ldots,3\}$, or it has the value $1$ 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.
