×

# Getting SIGSEGV on MKTHNUM problem on SPOJ

 1 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 161●8 accept rate: 0%

 1 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 6★meooow ♦ 6.7k●7●17 accept rate: 48% Thanks a lot!!! It got AC by removing the custom input. (14 Mar, 23:20)
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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,088
×2