Skip to content

Instantly share code, notes, and snippets.

@YukiSakamoto
Created May 2, 2015 08:13
Show Gist options
  • Save YukiSakamoto/58c9b8f6014d4befb3cb to your computer and use it in GitHub Desktop.
Save YukiSakamoto/58c9b8f6014d4befb3cb to your computer and use it in GitHub Desktop.
test
#include <numeric>
#include <functional>
#include <vector>
#include <iostream>
typedef std::vector<int> int_vector;
int main(void)
{
int_vector v;
v.push_back(0);
v.push_back(5);
v.push_back(10);
v.push_back(15);
v.push_back(20);
std::cout << std::accumulate(v.begin(), v.end(), 0) << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment