ibrahimsherif's blog

By ibrahimsherif, history, 6 years ago, In English

https://icpcarchive.ecs.baylor.edu/index.php?option=onlinejudge&Itemid=8&category=804&page=show_problem&problem=6491

Hi, I am trying to solve this problem from ACM ACPC 2017 — Array Queries contest using segment tree + lazy propagation but always gets wrong answer no matter what. Am I missing something or is my approach wrong ?

Here is my code: https://ideone.com/3s2FQk

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ibrahimsherif, history, 6 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By ibrahimsherif, history, 6 years ago, In English

http://acm.timus.ru/problem.aspx?space=1&num=1613

Hi, i am trying to solve this problem using SQRT decomposition but i am getting TLE, how can it be optimized more or is my approach wrong.

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

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it