fork(6) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <numeric>
  4.  
  5. int main() {
  6. std::vector<int> v;
  7. v.push_back(1);
  8. v.push_back(2);
  9. v.push_back(3);
  10.  
  11. auto rz = std::accumulate( v.begin(), v.end(), 0, []( int l, int r ) {
  12. return l * 10 + r;
  13. } );
  14. std::cout << rz << std::endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
123