proprietor needs to eliminate a few (perhaps zero) sunflowers to arrive at the accompanying two objectives:    At the point when you are on a vacant cell, you can stroll to some other void cell. All in all, those unfilled cells are associated.    There is actually one basic way between any two void

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Correct answer will be upvoted else downvoted. Computer science.

 

 the proprietor needs to eliminate a few (perhaps zero) sunflowers to arrive at the accompanying two objectives: 

 

At the point when you are on a vacant cell, you can stroll to some other void cell. All in all, those unfilled cells are associated. 

 

There is actually one basic way between any two void cells. All in all, there is no cycle among the vacant cells. 

 

You can stroll from an unfilled cell to another in the event that they share a typical edge. 

 

Could you kindly give the proprietor an answer that meets every one of her prerequisites? 

 

Note that you are not permitted to establish sunflowers. You don't have to limit the number of sunflowers you eliminate. It tends to be shown that the appropriate response consistently exists. 

 

Input 

 

The input comprises of different experiments. The main line contains a solitary integer t (1≤t≤104) — the number of experiments. The portrayal of the experiments follows. 

 

The principal line contains two integers n, m (1≤n,m≤500) — the number of lines and segments. 

 

Every one of the following n lines contains m characters. Each character is either 'X' or '.', addressing an unfilled cell and a cell that grows a sunflower, individually. 

 

It is ensured that the amount of n⋅m for all experiments doesn't surpass 250000. 

 

Output 

 

For each experiment, print n lines. Each ought to contain m characters, addressing one line of the table. Each character ought to be either 'X' or '.', addressing an unfilled cell and a cell with a sunflower, individually. 

 

In case there are numerous replies, you can print any. It very well may be shown that the appropriate response consistently exists.

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Intermediate SQL concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education