STL: priority_queue学習


API具体的な実装はゆっくりと補完します.
1.第1の呼び出し方法(最小ヒープ)
struct ListNode
{
    ListNode* next;
    int val;
    ListNode(int x): val(x), next(NULL) {}
};
struct cmp
{
    bool operator () (const ListNode* a, const ListNode* b)
    {
        return a->val > b->val;
    }
};
int main()
{
    priority_queue<ListNode*, vector<ListNode*>, cmp> q;

    return 0;
}