Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Only do part C of this problem the sample input is below 3. (15 points) Suppose there are two types of professional wrestlers:

In C++

Only do part C of this problem

the sample input is below

image text in transcribed

3. (15 points) Suppose there are two types of professional wrestlers: "Babyfaces" ("good guys") and "Heels" ("bad guys"). Between any pair of professional wrestlers, there may or may not be a rivalry. Suppose we have n wrestlers and we have a list of r pairs of rivalries (a) Give pseudocode for an efficient algorithm that determines whether it is possible to designate some of the wrestlers as Babyfaces and the remainder as Heels such that each rivalry is between a Babyface and a Heel. If it is possible to perform such a designation, your algorithm should produce it. (b) What is the running time of your algorithm? (c) Implement: Babyfaces vs Heels in C, C++ or Python. Name your program wrestler and include compile and executions instructions in the README file Input: Input is read in from a file specified in the command line at run time. The file contains the number of wrestlers, n, followed by their names, the number of rivalries r and rivalries listed in pairs. Note: The file only contains one list of rivalries Output: Results are outputted to the terminal Yes, if possible followed by a list of the Babyface wrestlers and a list of the Heels . No, if impossible Sample Input file Ace Duke Jax Biggs Stone 6 Ace Duke Ace Biggs Jax Duke Stone Biggs Stone Duke Biggs Jax Sample Output Yes Babyfaces: Ace Jax Stone Heels: Biggs Duke

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_2

Step: 3

blur-text-image_3

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

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions

Question

IPSec is used to protect what type of data? encryption

Answered: 1 week ago