Handout

经常忘记的c++常识

#include <algorithm>

  • lower_bound

Returns an iterator pointing to the first element in the range [first,last) which does not compare less than val.

vector >= val

  • upper_bound

Returns an iterator pointing to the first element in the range [first,last) which compares greater than val.

vector > val

  • sort

  • swap

#include <functional>

  • template greater<int>()

#include <utility>

  • pair<int, int>

#include <queue>

  • priority_queue

top, push, pop

#include <stdlib.h>

  • rand
  • srand

results matching ""

    No results matching ""