multiset 的 count(x) 复杂度能被卡到线性,因为 STL 的实现是二分找到第一个 x 然后一直向后扫.所以复杂度是 log\loglog + x 的元素个数的. 同理 unordered_multiset 的 count 的复杂度也不是 O(1). 6