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


Need help with INSQ15_C

Problem link
My code

I am getting TLE. I tried to follow the approach in the editorial. I divided the array into two parts and found subsets of size less than equal to k. I stored them in vectors and sorted first vector based on number of elements in the subset. I used binary search to find required pairs in first and second vector.

asked 10 Sep '15, 16:28

dragonemperor's gravatar image

accept rate: 10%

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: 10 Sep '15, 16:28

question was seen: 260 times

last updated: 10 Sep '15, 16:28