用STL实现优先队列
摘要:
#include<iostream>#include<queue>using namespace std;struct node{ int a; int b; };struct cmp{ //reset operator for node bool operator ()(const node &c,const node &d){ return (c.a<d.a); //from high to low } };int main(){ int c[5]={3,1,12,6,5}; node b[5]; b[0].a=2; b[1].a=5; b[3 阅读全文
posted @ 2012-07-01 11:28 yumao 阅读(283) 评论(0) 推荐(0)
浙公网安备 33010602011771号