_kite's blog

By _kite, history, 3 years ago, In English

Suppose, you have icpc regional ahead or any important contest like that ; but you are 103°F high :') How would you manage to do well with that much high fever?

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

By _kite, history, 4 years ago, In English

I don't understand how this new logo goes with .

Previous one was much relatable and nice. I wish this change to be temporary.

Full text and comments »

  • Vote: I like it
  • +32
  • Vote: I do not like it

By _kite, history, 4 years ago, In English

Good things about 2020

Spoiler

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By _kite, history, 4 years ago, In English

Problem Link . My Solution . WA in test case 11 .

I sorted array a increasingly ans b decreasingly . Then for every element in array b , I searched the lower bound in array a .
My code is pretty simple to understand.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By _kite, history, 4 years ago, In English
  • Vote: I like it
  • -3
  • Vote: I do not like it

By _kite, history, 5 years ago, In English

An array of n elements is given. In this array, How many intervals [l,r] contain at least two 2 ? How many intervals [l,r] contain at least one 4? How many intervals contain two 2 and one 4 together? Note that, [1,1],[2,2] these intervals are also valid. Each of them contains 1 element.

Size of n is 1e5.

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By _kite, 5 years ago, In English
  • Vote: I like it
  • -66
  • Vote: I do not like it

By _kite, history, 5 years ago, In English

Problem Link I have come up with a nice idea . I will just use three vectors to keep the negative numbers(v1),zeros(v2),positive numbers(v3).

Let the size of the vectors v1,v2,v3.

Then there will be (v1* v3) negative products , ((v1*v2 + (v3*v2)) zeros , ( (v1*(v1-1))/2 + (v3*(v3-1))/2) positive products.

So I can easily know whether Kth number will be negative or zero or positive.

But I am failing to print the answer when It is a positive number. I don't know how to find the positive product which is in this -- >( (v1*(v1-1))/2 + (v3*(v3-1))/2) count.

Please Help.

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By _kite, history, 5 years ago, In English

Can anyone provide me some 2D segment tree problems ?

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it