QueenCovering
TCCC06 Spon 1 · 2006-08-22 · by Cosmin.ro
Problem Statement
You are given a
Constraints
- board will have exactly 8 elements.
- Each element of board will contain exactly 8 characters.
- Each character of board will be either '.' or '#'.
{
"........",
"..######",
".#.#####",
".##.####",
".###.###",
".####.##",
".#####.#",
"........"}
Returns: "1A8B"
We place one queen on the first row and the first column, and another queen on the last row and on the second column.
{
"#......#",
".#......",
"..#...#.",
"........",
"..#.....",
"..#..#..",
"#.......",
"#...###."}
Returns: "1B2D3A4C5E"
{
"........",
"........",
"........",
"........",
"........",
"........",
"........",
"........"}
Returns: "1A2C3E4B5D"
{
"..##.##.",
".###..##",
"##..###.",
"#..#...#",
".#.##.#.",
"#...##..",
"#..#####",
"..#..#.#"}
Returns: "1A4C5H6B"
{
"##..###.",
"#######.",
"######.#",
"#####.#.",
"#####.##",
"#.####..",
"#####...",
"#..####."}
Returns: "1C2H6G"
Submissions are judged against all 38 archived test cases, of which 5 are shown here. Case numbers match the judge’s.
Language: C++17 · define a public class QueenCovering with a public method string getPlacement(vector<string> board) · 38 test cases · 2 s / 256 MB per case