You are viewing a single comment's thread. Return to all comments →
return accumulate(ar.begin(), ar.end(), 0ll);
notice the ll after 0
just wondering, why is the initial value 0ll? What does that mean? I have done a search on it and all I am understanding is that the double L means long long. Also, I am having trouble understading a clear definition of initial value. From the tutorials I see, it looks like the value before the first value in the array or vector. Is that wrong?