02 2021 档案
摘要:void Bubble_sort(int *a, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1; j++) { if (a[j] > a[j + 1]) { int tmp = a[j]; a[j] = a[
阅读全文
摘要:C++函数式编程里主要介绍了folding【折叠】的使用,在C++STL中,accumulate(求和)正是其中的佼佼者,我使用了这个标准库函数实现了另一个标准库函数find_if。以下是代码 template <typename Input, typename UnaryPredicate> In
阅读全文
摘要:/* Zarathos 2021.2.1 1:30 pair 算是第二版了。之前那版写的太烂,两年后重写了一下,不过这次耗时更少了【可能是熟练了233】 完成了pair类的基本操作(构造函数 赋值运算符重载等) 完成了配套的Get和make_pair函数,非成员函数。属于友元 明天写完剩下的运算符重
阅读全文

浙公网安备 33010602011771号