fork(1) download
  1. #include<iostream>
  2. #include<vector>
  3. #include<numeric>
  4. using namespace std;
  5. int main() {
  6. vector<long long int> v={1000000000 , 1000000000 , 1000000000 , 1000000000};
  7. cout<<"Sum of all the elements are:"<<endl;
  8. cout<<accumulate(v.begin(),v.end(),0ll);
  9. }
Success #stdin #stdout 0s 4708KB
stdin
Standard input is empty
stdout
Sum of all the elements are:
4000000000