Блог пользователя rahulnagurtha

Автор rahulnagurtha, история, 8 лет назад, По-английски

This blog post is a continuation of this question. I want to know the chances of getting segmentation fault when accessing out-of-bound array element. Does the chances depend on whether the array is allocated on stack or heap ? Thanks.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор rahulnagurtha, история, 8 лет назад, По-английски

While I was solving this question during virtual contest, this submission gave me Memory Limit Exceeded verdict, when I changed the code slightly (I just made "vector" ans a global vector) it was accepted, here is the accepted version. The point to observe here is that "vector ans" is of size 193 only, which is very small to cross the given memory limits. I couldn't figure out what is wrong with my code. Any help is appreciated.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор rahulnagurtha, история, 9 лет назад, По-английски

I have tried solving this http://www.codechef.com/problems/CHEFD/ problem using sqrt decomposition technique,but im getting AC for some cases and wrong answer for some cases......Can anyone discuss your idea using sqrt decomposition method for this problem,thanks......

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится