Can anyone explain the difference?
Difference between en3 and en4, changed 0 character(s)
Hi!↵


I have two really similar submissions to problem (https://mirror.codeforces.com/contest/1266/problem/E)↵



https://mirror.codeforces.com/contest/1266/submission/67209030 (**WA version**)↵

https://mirror.codeforces.com/contest/1266/submission/67209163 (**AC version**)↵



The WA version has the following line:↵

~~~~~↵
long long ans = accumulate( a.begin(), a.end(), 0, [] (long long a, long long b) { return a + b; } );↵
~~~~~↵



With this simple change on this specific line I got it accepted.↵

~~~~~↵
long long ans = accumulate( a.begin(), a.end(), 0ll, [] (long long a, long long b) { return a + b; } );↵
~~~~~↵



Why the zero of the WA version does not seem to be converted to long long?↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English FThiesen 2019-12-19 16:41:26 0 (published)
en3 English FThiesen 2019-12-19 16:39:42 170
en2 English FThiesen 2019-12-19 16:36:13 2 Tiny change: 's one...\n~~~~~\nl' -> 's one...\n\n~~~~~\nl'
en1 English FThiesen 2019-12-19 16:35:55 693 Initial revision (saved to drafts)