Problem Setter & Dataset: Md. Albin Hossain

Reviewer: Saiful Islam Ramim

Alternate Writer: Siam Ahmed

Problem Category: Geometry

Contest Solve Count: 150/500150/500 (Expected) (To be updated after the contest).

Problem Analysis:

Given PQPQ. To find the area of the square ABCDABCD we need to find a side ABAB. Then we can find the area of ABCD=AB2ABCD={AB}^2.

Sides of square ABCDABCD are equal, therefore AB=BCAB = BC and P,QP, Q are midpoints of ABAB, and BCBC respectively. So PB=BQPB=BQ and AB=2PBAB= 2PB.

Consider the triangle PBQ\bigtriangleup PBQ. PBQ\angle PBQ is 90°90° as ABCDABCD is a square by definition.

We can get by Pythagorean theorem,

PB2+BQ2=PQ2PB^2 + BQ^2 = PQ^2

PB2+PB2=PQ2[PB=BQ]PB^2 + PB^2 = PQ^2 \quad [ \because PB = BQ]

2PB2=PQ22PB^2 = PQ^2

4PB2=2PQ24PB^2 = 2PQ^2 \quad [Multiply both side by 2]

(2PB)2=2PQ2(2PB)^2 = 2PQ^2

AB2=2PQ2[AB=2PB]AB^2 = 2PQ^2 \quad [ \because AB = 2PB]

AB2=AB^2=Area of ABCDABCD square.

Source Code:

#include<stdio.h>
int main() {
    int pq;
    scanf("%d", &pq);
    int area = 2 * pq * pq;
    printf("%d\n", area);
    return 0;
}

Statistics

97% Solution Ratio
polashEarliest, Dec '22
rohan33Fastest, 0.0s
leviathan_09Lightest, 4.9 MB
ThisIsZubayerShortest, 22B
Toph uses cookies. By continuing you agree to our Cookie Policy.