Maincpp Alter Maincpp Include Include Using Namespace Std Include Buglifecpp Int Main Int Q37127299

Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different gen

Input: 1 2 2 3 1 3 4 2 1 2 3 4 Output: Scenario #1: Suspicious bugs found! Scena rio #2 : No suspicious bugs found!

//main.cpp

//DO NOT alter main.cpp

#include <cstdio>
#include <vector>

using namespace std;

#include “buglife.cpp”

int main() {
int numScenario;

   scanf(“%d”,&numScenario);

vector<int> b1;
vector<int> b2;

for(int sNum=1; sNum<=numScenario; sNum++) {
int numBugs;
int numInter;
       scanf(“%d%d”,&numBugs,&numInter);

b1.clear();
b2.clear();

b1.resize(numInter,0);
b2.resize(numInter,0);

for(int i=0; i<numInter; i++) {
int p1, p2;
           scanf(“%d%d”,&p1,&p2);
b1[i] = p1;
b2[i] = p2;
}

printf(“Scenario #%d:n”,sNum);

// for(int i=0; i<numInter; i++) {
// cout << b1[i] <<

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.