[Solution] Largest Square in the garden CodeChef Solution 2022
Chef has a garden of size . The garden is divided into squares of size each.
Chef has plants in some unit squares of the garden, because of which, that part looks green.
Formally, for the row , Chef has plants in all the columns from to (both inclusive) where .
Help Chef find the length of the side of the largest square that is green.
Input Format
- The first line contains an integer , the size of the garden.
- The next lines contain two space-separated integers and , representing that plants are present in all the columns from to (both inclusive) of the row.
Output Format
Output a single integer denoting the length of the side of the largest square that is green. In other
Pass the Exam CodeChef Solution
Chef and Candies CodeChef Solution
Journey of the Knight CodeChef Solution
Slow Solution CodeChef Solution
Game of Piles Version 1 CodeChef Solution
Find A, B, C CodeChef Solution
Largest Square in the garden CodeChef Solution
Game of Piles Version 2 CodeChef Solution
words, output the length of the side of the square with maximum size, inside which all unit squares have plants.
No comments:
Post a Comment