摘要: 使用std::max_element和std::min_element可以得到vector的最大值和最小值 其定义于头文件 <algorithm>中,用来寻找范围 [first, last) 中的最大元素。 返回值为: 指向范围 [first, last) 中最大元素的迭代器。若范围中有多个元素等价 阅读全文