Canadian Computing Competition: 2022 Stage 1, Junior #5
Ron wants to build a square pool in his square
Input Specification
The first line of input will be an integer
The following table shows how the available 15 marks are distributed.
Marks Awarded | Length/Width of Yard | Number of Trees |
---|---|---|
Output Specification
Output one line containing
Sample Input 1
5
1
2 4
Output for Sample Input 1
3
Explanation of Output for Sample Input 1
A picture of the yard is below. The location of the tree is marked by and one of several

Sample Input 2
15
8
4 7
4 1
14 11
10 6
13 4
4 10
10 3
9 14
Output for Sample Input 2
7
Explanation of Output for Sample Input 2
A picture of the yard is below. The location of each tree is marked by and one of several

Comments
This comment is hidden due to too much negative feedback. Show it anyway.
J5, 10 points....
Omg,
cells in grid of Ron's yard. This is what brute force really is.
ignore comment i'm not thinking straight today
I've been writting a functional method to find the maximum space available,for the whole afternoon.Yet nothing came out.This is a hard one...
I have no idea why it always tell me index error