c++ reduce usage
std::reduce is an algorithm introduced in C++17, used similarly to std::accumulate, and located in the <numeric> header file. It is used to compute a "generalized sum" of elements in a range (such as an array or container), similar to progressively merging all elements into a single result. It uses addition by default, but custom operations (such as multiplication) can be defined. Its core advantage is its support for parallel execution, making it suitable for large-scale data and improving efficiency.