fork(1) download
  1. #include "bits/stdc++.h"
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. vector<long long> vect{1,-1000000000,1,-1000000000,1,-1000000000};
  8.  
  9. long long good = accumulate(vect.begin(), vect.end(), 0L);
  10. long long bad = accumulate(vect.begin(), vect.end(), 0LL);
  11.  
  12. cout<<good<<endl<<bad<<endl;
  13.  
  14. }
Success #stdin #stdout 0s 5536KB
stdin
Standard input is empty
stdout
-2999999997
-2999999997