Help with a Segment Tree Problem

Revision en1, by ibrahimsherif, 2018-04-22 03:49:04

http://www.spoj.com/problems/CNTPRIME/

Hi, i am trying to solve this problem its a simple range count segment tree with lazy updates but no matter how i try it gets wrong answer but it outputs correctly everything i try at it.

Here is my code: https://ideone.com/y8V607

Tags #segment tree, lazy propagation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ibrahimsherif 2018-04-22 03:49:04 307 Initial revision (published)