You are not logged in. Please login at to post your questions!


Getting SIGSEGV on MKTHNUM problem on SPOJ

I'm trying to solve this problem using persistant segment tree. But I'm getting sigsegv error and I can't figure out why as I tested my code on random test cases on my system and it works fine. Please help! My Code

asked 13 Mar, 17:12

underdog_eagle's gravatar image

accept rate: 0%

Your code is correct. The issue is probably with the test case 16 (it shows "Running .. (16)" just before the SIGSEGV verdict). If you replace your custom input function with cin or scanf you will get AC.


answered 14 Mar, 22:52

meooow's gravatar image

6★meooow ♦
accept rate: 47%

Thanks a lot!!! It got AC by removing the custom input.

(14 Mar, 23:20) underdog_eagle5★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 13 Mar, 17:12

question was seen: 86 times

last updated: 14 Mar, 23:20