Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Language You are given 4n sticks, the length of the i-th stick is a;. You have to create n rectangles, each rectangle will consist

C++ Language image text in transcribed
image text in transcribed
image text in transcribed
You are given 4n sticks, the length of the i-th stick is a;. You have to create n rectangles, each rectangle will consist of exactly 4 sticks from the given set. The rectangle consists of four sides, opposite sides should have equal length and all angles in it should be right. Note that each stick can be used in only one rectangle. Each stick should be used as a side, you cannot break the stick or use it not to the full length. You want to all rectangles to have equal area. The area of the rectangle with sides a and b is a . b. Your task is to say if it is possible to create exactly n rectangles of equal area or not. You have to answer q independent queries. Input The first line of the input contains one integer q (1 59

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions