# Adding Squares Codechef October Long challenge Problem Code

## Adding Squares  Codechef October Long challenge Problem Code-

### problem Statement-

There are $N$ different vertical lines on the plane, $i$-th of which is defined by the equation $x={a}_{i}$ ($0\le {a}_{i}\le W$) and $M$ different horizontal lines, $i$-th of which is defined by the equation $y={b}_{i}$ ($0\le {b}_{i}\le H$). You must add one line of the form $y=k$ ($0\le k\le H$$k\ne {b}_{i}$ for every $1\le i\le M$) to the plane. What is the maximum possible number of squares with different areas you can obtain on the plane? (Squares can have other lines passing through them)

### Input:

• First line will contain $4$ integers

This post first appeared on Technical Keeda, please read the originial post: here

# Share the post

Adding Squares Codechef October Long challenge Problem Code

×