Maximum borders SOLUTIONS September Circuits ’20

Maximum borders SOLUTIONS

You are given a table with lines and segments. Every cell is shaded with white or dark. Considering the shapes made by dark cells, what is the most extreme outskirt of these shapes? 
 
A shape is a lot of associated cells. Two cells are associated in the event that they share an edge. Note that no shape has a gap in it. 
 
Information design 
 
The primary line contains signifying the quantity of experiments. 
 
The principal line of each experiment contains whole numbers meaning the quantity of lines and sections of the network. Here, ‘#’ speaks to a dark cell and ‘.’ speaks to a white cell. 
 
Every one of the following lines contains whole numbers. 
 
Yield design 
 
Print the most extreme fringe of the shapes. 
 
Test INPUT 
 
10 
 
2 15 
 
…..####…… 
 
…..#……… 
 
7 9 
 
…###… 
 
…###… 
 
..#…… 
 
.####…. 
 
..#…… 
 
…#####. 
 
……… 
 
18 11 
 
.#########. 
 
########… 
 
………#. 
 
####……. 
 
…..#####. 
 
…..##…. 
 
….#####.. 
 
…..####.. 
 
..###…… 
 
……#…. 
 
….#####.. 
 
…####…. 
 
##……… 
 
#####…… 
 
….#####.. 
 
….##….. 
 
.#######… 
 
.#……… 
 
1 15 
 
…..######…. 
 
5 11 
 
..#####…. 
 
.#######… 
 
……#…. 
 
….#####.. 
 
…#####… 
 
8 13 
 
…..######.. 
 
……##….. 
 
########….. 
 
…#……… 
 
…………. 
 
#######…… 
 
..######….. 
 
####……… 
 
7 5 
 
….. 
 
..##. 
 
###.. 
 
..##. 
 
….. 
 
..#.. 
 
.#… 
 
14 2 
 
.. 
 
#. 
 
.. 
 
#. 
 
.. 
 
#. 
 
.. 
 
.. 
 
#. 
 
.. 
 
.. 
 
.. 
 
#. 
 
.. 
 
7 15 
 
.###########… 
 
##############. 
 
…####…….. 
 
…##########.. 
 
…….#……. 
 
…..#########. 
 
.#######……. 
 
12 6 
 
#####. 
 
###… 
 
#….. 
 
##…. 
 
###… 
 
…… 
 
.##… 
 
..##.. 
 
…#.. 
 
..#… 
 
#####. 
 
####.. 
 
Test OUTPUT 
 
 
 
 
 
 
 
 
 
11 
 
 
Clarification 
 

March Long Challenge 2021 Solutions

April Long Challenge 2021 Solutions

Codechef Long Challenge Solutions

February Long Challenge 2021

1. Frog Sort Solution Codechef

2. Chef and Meetings Solution Codechef

3. Maximise Function Solution Codechef

4. Highest Divisor Solution Codechef

5. Cut the Cake Challenge Solution Codechef

6. Dream and the Multiverse Solution Codechef

7. Cell Shell Solution Codechef

8. Multiple Games Solution Codechef

9. Another Tree with Number Theory Solution Codechef

10. XOR Sums Solution Codechef

11. Prime Game Solution CodeChef

12. Team Name Solution Codechef

January Long Challenge 2021

November Challenge 2020 SOLUTION CodeChef

October Lunchtime 2020 CodeChef SOLUTIONS

RELATED :

Related :

Related :

Leave a Comment