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


MKTHNUM from SPOJ--help required

question link : my code link : 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

msd_007's gravatar image

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) vijju123 ♦♦5★

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) vijju123 ♦♦5★

how can we solve it using persistant segment tree ??

(03 Sep '17, 00:04) msd_0071★
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: 31 Aug '17, 22:49

question was seen: 237 times

last updated: 03 Sep '17, 00:04