You are not logged in. Please login at www.codechef.com 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

5★underdog_eagle
1618
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.

link

answered 14 Mar, 22:52

meooow's gravatar image

6★meooow ♦
6.5k617
accept rate: 49%

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

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

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,066
×2

question asked: 13 Mar, 17:12

question was seen: 113 times

last updated: 14 Mar, 23:20