Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official. ×

### Dipjal.Chhetri's blog

By Dipjal.Chhetri, history, 21 month(s) ago, ,

Given N points in two dimensional space and Q queries. In each query, given two non negative integers a , b. Find the point (x,y) such that F(x,y) is minimum, where F(x,y) = a * x + b * y

Constraints:
1 <= N <= 10^6
1 <= Q <= 10^5
0 <= a , b <= 10^9
0 <= |x| , |y| <= 10^9

Thank You!

Read more »

•
• +23
•

By Dipjal.Chhetri, history, 2 years ago, ,

Hi all, Happy New Year!

I have recently changed my user handle using magic. Now, in my all submissions as well contest rankings, instead of showing my new handle, it is showing just blank.

My Old handle — deep96

New handle — Dipjal.Chhetri

I dont know if this is a bug or something else.

Hope this will be fixed soon!

Thanks.

Read more »

•
• +19
•

By Dipjal.Chhetri, history, 2 years ago, ,

Given an array, and there are Q queries of two types.

Type-1 : given l , r , val

Update a[i] = a[i] xor val where i = [l , r]

Type-2 : given l , r

Return sum of a[i] where i = [l , r]

Can it be solved by segment tree with lazy propagation?

ThankYou :)

Read more »

•
• +4
•

By Dipjal.Chhetri, history, 2 years ago, ,

Hi all,

My solution to problem http://codeforces.com/contest/688/problem/D

gave RuntimeError when i took array input before and then processed.

But the same code gave AC when I processed simultaenously while taking input.

I have no idea why the first code gave runtime error :(

RUNTIME ERROR CODE- http://codeforces.com/contest/688/submission/18818380

Thank you :))

Read more »

•
• +1
•

By Dipjal.Chhetri, history, 3 years ago, ,

Hi all ,

Is it possible to calculate the Nth (1 <= N <= 1e18) term of following quadratic recurrence using matrix exponentiation.

F(i) = a * F(i -1) * F(i -1) + b * F(i -1) + c , where a , b , c are non negative constants and F0 (Initial Term) is given.

Read more »

•
• +3
•