×

# MKTHNUM from SPOJ--help required

 0 question link : http://www.spoj.com/problems/MKTHNUM/ my code link : https://ideone.com/JLNF6b im getting TLE...donno whether my logic is correct or not...!! if wrong pls correct ...if correct help me in getting a decent approach !! thanks in advance : ) asked 31 Aug '17, 22:49 1★msd_007 317●8 accept rate: 5% I suspect that its the merging of vectors thats giving you TLE. It depends on linearly on size of vector (afaik) and can cause a TLE if limit is strict. I am looking at possible approaches. (01 Sep '17, 00:18) Is my logic correct bro @vijju123 ?? (01 Sep '17, 10:47) msd_0071★ The logic seems correct bro. Just try to get around without using vectors. Also, I think concept of persistence is required. (01 Sep '17, 16:19) how can we solve it using persistant segment tree ?? (03 Sep '17, 00:04) msd_0071★
 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:

×699
×74
×28

question asked: 31 Aug '17, 22:49

question was seen: 237 times

last updated: 03 Sep '17, 00:04