sqrt decomposition

Revision en1, by princejvm, 2017-10-30 18:21:42

Does the sequence of including or excluding elements in block via changes in left pointer and right pointer matters. As in question http://mirror.codeforces.com/contest/351/problem/D my solution got accepted for left exclusion-> right inclusion-> right exclusion->left inclusion but resulted into wrong answer for left exclusion->left inclusion-> right inclusion-> right exclusion my accepted solution http://mirror.codeforces.com/contest/351/submission/31897729 my wrong answer submission-> http://mirror.codeforces.com/contest/351/submission/31897757 kindly see this problem as it's strange!!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English princejvm 2017-10-31 22:30:57 0 problem solved
en1 English princejvm 2017-10-30 18:21:42 598 Initial revision (published)