priority_q, priority_q_one;
for (int h = 0; h < 7; h++) { priority_q.push(rand()%100);
}
priority_q_one = priority_q;
cout << "priority_q navbatdigi birinchi element " << priority_q.top() << endl; cout << " priority_q_one navbatdigi birinchi element " << priority_q_one.top() <<
endl;
priority_q.pop();
cout << "priority_q navbatdigi birinchi element (oʻchirishdan soʻng): " << priority_q.top() << endl;
cout << "priority_q navbat boʻsh " << (priority_q.empty()?"":"emas") << endl;
while (!priority_q_one.empty())
{
cout << "priority_q_one navbatdigi element : " << priority_q_one.top() <<
endl;
priority_q_one.pop();
}
cout << " priority_q_one navbat boʻsh " << (priority_q_one.empty()?"":"emas") << endl;
system("pause"); return 0;
}