using namespace std;//implement/copy your queue structure and functions above
//then declare two instances:
//Queue Q1 Q2;
//if you want make a s
#include
#include using namespace std;//implement/copy your queue structure and functions above
//then declare two instances:
//Queue Q1 Q2;
//if you want make a separate function to change the
//signals between the queues (either green or red)
//When the signal changes one queue only is allowed to delete elements//void ChangeSignal();int Q1phase = 30;//initial attempt
int Q2phase = 40;//initial attempt
const int Q1arrive = 18;//fixed
const int Q2arrive = 22;//fixed
const int leave_rate = 10;//fixed one car leaves either queue every 10 secondsint car_id=0;
int Clock=0;
bool Q1_green Q2_green;//indicates which queue is opened only one at a timeint main(int argc char **argv) {
if(argc!=3) {cout