Question: I can't seem to get this code to work: #include #include #include #include using namespace std; /** * Auto-generated code below aims at helping you

I can't seem to get this code to work:

#include

#include

#include

#include

using namespace std;

/**

* Auto-generated code below aims at helping you parse

* the standard input according to the problem statement.

**/

int main()

{

int N; // Number of elements which make up the association table.

cin >> N; cin.ignore();

int Q; // Number Q of file names to be analyzed.

cin >> Q; cin.ignore();

for (int i = 0; i < N; i++) {

string EXT; // file extension

string MT; // MIME type.

cin >> EXT >> MT; cin.ignore();

}

for (int i = 0; i < Q; i++) {

string FNAME;

getline(cin, FNAME); // One file name per line.

}

// Write an answer using cout. DON'T FORGET THE "<< endl"

// To debug: cerr << "Debug messages..." << endl;

cerr << "Debug messages..." << endl;

cout << "image/gif" << endl;

// For each of the Q filenames, display on a line the corresponding MIME type. If there is no corresponding type, then display UNKNOWN.

cout << "UNKNOWN" << end;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!