- 1

Help with task - programming in C

Hello, Can anybody help me to do task in C ? I am lost. Thank youuu. ______________ A collection of labyrinths was found during the excavation of the ancient library. Our task is to classify these labyrinths, which is enough challenging task. Fortunately, labyrinth plans have already been digitized and your task is to design an algorithm and write a program to determine whether it is possible to reach the central courtyard in a simple way that at each intersection or turn left. During digitization, the labyrinth pattern was recorded as a grid of cells, each of which can represent either a wall or a paving. The walls are formed by a series of blocks that form horizontal or vertical corridors with each other (the corridors are only wide per cell). Each labyrinth has one entrance, a gap in its outer wall. Each labyrinth also has one central courtyard, which has a different shape than the corridors (the courtyard represents more than one cell of paving in height and width). There is only one labyrinth map in each plan. The first line of input contains a positive integer R less than 100, which corresponds to the number of lines in the plan. Second line input contains a positive integer S less than 100, which corresponds to the number of columns in the plan. On the next lines followed by a plan of size R x S represented by a '#' character representing a wall and a '.' representative paving. Your program will output the result YES or NO to standard output, depending on whether it is possible to get to the central courtyard only by turning left at each intersection. Note: Define at least one new function in the program and create the required header file. Input example: 30 50 .................................................. .................................................. .................................................. .....##############..............############..... .....#.........#..#..............#..........#..... .....#.#######.#.##..............#.########.#..... .....#.

23rd May 2021, 9:11 AM
Pjiter
2 Answers
0
.................................................. .................................................. .................................................. .....##############..............############..... .....#.........#..#..............#..........#..... .....#.#######.#.##..............#.########.#..... .....#.#.....#....#..............#.#......#.#..... .....#.#.#####.####..............#.#.####.#.#..... .....#.#.....#...#################.#.##.#...#..... .....#.#####.###........................#.#.#..... .....#.........#.###############.#.##########..... .....#########.#.#.#...........#.#..#............. .............#.#.#.#...........###.##............. .............#.#.#.#...........#....#............. .............#.#...#...........#.##.#............. .............#######...........#.##.#............. .............#.................#.#..#............. .............#.#################.####............. .....#########...#.................##########..... .....#.........###.#.#.##########.#######.#.#..... .....#.#########.....#.#..........#.....#.#.#..... .....#.#.........#####.##########.#.###.#.#.#..... .....#.######.#####...........#.#.#.#.#.#.#.#..... .....#......#.....#...........#.....#.#.#.#.#..... .....#.##########.#...........#####.#.#.#.#.#..... .....#............#...........#...........#.#..... .....##############...........###############..... .................................................. .................................................. .................................................. Output: YES
23rd May 2021, 9:18 AM
Pjiter