c++ priority_queue应用(重要)
摘要:自定义排序 重写仿函数 struct cmp{ bool operator() ( Node a, Node b ){//默认是less函数 //返回true时,a的优先级低于b的优先级(a排在b的后面) if( a.x== b.x ) return a.y> b.y; return a.x> b.
阅读全文
posted @ 2020-11-04 21:32
posted @ 2020-11-04 21:32