Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <windows.h>
- using namespace std;
- class WinCmdFns {
- public:
- static void setColor(int ForgC) {
- WORD wColor;
- HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- if (GetConsoleScreenBufferInfo(hStdOut, &csbi)) {
- wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
- SetConsoleTextAttribute(hStdOut, wColor);
- }
- }
- };
- struct Edge {
- int to, time;
- };
- struct EdgeCmp {
- bool operator() (const Edge &e1, const Edge &e2) {
- return e1.time < e2.time;
- }
- };
- int main() {
- priority_queue<Edge, vector<Edge>, EdgeCmp> pq;
- pq.push({-1, 12});
- pq.push({-1, 33});
- cerr << pq.top().time << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement