1. two_smallest
#
点击查看考点
模板, 排序 (?)
Write function template two_smallest
, which finds the two minimum values of the three elements.
翻译
编写一个函数模板 two_smallest
, 它返回三个元素中两个较小元素.
点击查看解答参考
警告
此卷的所有解答参考都是笔者考试时实际写的代码的回忆版, 所以 相比于其他卷的解答参考可能更为超纲难懂.
主要是在展示以 "C++98 + Lambdas + range-based for + auto + STL" 为学习内容能如何秒杀转专业题目.