home *** CD-ROM | disk | FTP | other *** search
- #include <LEDA/prio.h>
-
- declare2(priority_queue,real,string)
-
-
- main()
-
- { priority_queue(real,string) Q;
- real r;
- pq_item it;
-
- while (cin >> r) Q.insert(r,string("-%f-",~r));
-
- while (!Q.empty())
- { it = Q.find_min();
- cout << "delete: " << Q.key(it) << " " << Q.inf(it) << "\n";
- Q.del_item(it);
- }
- }
-