Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needs to be coded in C++, Project for DAta structure class Is Bigger Smarter Some people think that the bigger an elephant is, the smarter

Needs to be coded in C++, Project for DAta structure class

image text in transcribed
Is Bigger Smarter Some people think that the bigger an elephant is, the smarter it is. To disprove this, you want to take the data on a collection of elephants and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the IQ's are decreasing. Input The input will consist of data for a bunch of elephants, one elephant per line, terminated by the end offilei The data for a particular elephant will consist of a pair of integers: the first representing its size in kilograms and the second representing its IQ in hundredths of IQ points. Both integers are between 1 and 10m. The data will contain information for at most 101]] elephants. Two elephants may have the same weight, the same IQ, or even the same weight and IQ. Output Say that the numbers on the ith data line are W[i] and S[i]. Your program should output a sequence of lines of data; the first line should contain a number n; the remaining 11 lines Should each contain a single positive integer [each one representing an elephant]. If these n integers are u.[1]. a[2],. ..ra[n] then it must be the case that W[a[1]]

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

=+List six problems with fiscal policy .

Answered: 1 week ago