Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
bool equals = std::accumulate(xs.begin(), xs.end(), 0) == std::accumulate(xs.rbegin(), xs.rend(), 0);
std::cout << equals << "\n"; //1 == true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment