subject

Write a program that takes input from stdin with the following properties: input is split into lines delimited by newline characters. every line has the same length. every line consists of an arbitrary sequence of hyphens ("-") and asterisks ("*").the final line of input is terminated by a newline character. in this challenge, each character in the input will have coordinates defined by (line number, character number), starting at the top and left. so the first character on the first line will have the coordinates (1,1) and the fifth character on line 3 will have the coordinates (3,5).the program should find a box (or boxes) in the input with the following properties: the box must be defined by two pairs of coordinates corresponding to its top left and bottom right corners. it must be the minimum bounding box for some contiguous group of asterisks, with each asterisk being horizontally or vertically (but not diagonally) adjacent to at least one other asterisk in the group. the box should not strictly bound the group, so the coordinates for the box in the following input should be (2,2)(3,3) not (1,1)(4,**--** should not overlap (i. e. share any characters with) any other minimum bounding boxes. of all the non-overlapping, minimum bounding boxes in the input, it should be the largest. if any boxes satisfying the conditions can be found in the input, the program should return an exit code of 0 and, for each box, print a line to stdout with the two pairs of coordinates. so, given the file “groups. txt” with the following content: -*--**running your program with this input would look something like this: > cat groups. txt | bounding-box(1,1)(2,2)this is because the larger groups on the right of the input have overlapping bounding boxes, so the returned coordinates bound the smaller group on the top left.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 25.06.2019 01:20
Jason typically uses the internet to buy various items. it the total cost of all of the items ordered, at one time, is $250 or more, then the shipping and handling is free, otherwise the shipping and handling is $15 per item. design an algorithm that prompts jason to enter the number of items ordered and the price of each item. (remember cost = number of items order times price) the algorithm then outputs the total billing amount including shipping and handling. your algorithm must use a loop (repetition structure) to get the number and price of each item. write this in algorithm format not program code format.
Answers: 2
question
Computers and Technology, 25.06.2019 07:20
Acompany's intranet is set up on this type of server. application communication print web
Answers: 1
question
Computers and Technology, 25.06.2019 08:00
Astrategy for speeding up hard drive performance is
Answers: 2
You know the right answer?
Write a program that takes input from stdin with the following properties: input is split into lines...
Questions
question
Mathematics, 12.12.2020 15:50
question
History, 12.12.2020 15:50
question
Mathematics, 12.12.2020 15:50
question
Mathematics, 12.12.2020 15:50
question
English, 12.12.2020 15:50
Questions on the website: 13722360