Блог пользователя code_hard123

Автор code_hard123, история, 7 лет назад, По-английски

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!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +23
  • Проголосовать: не нравится

Автор code_hard123, история, 7 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +19
  • Проголосовать: не нравится

Автор code_hard123, история, 8 лет назад, По-английски

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 :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор code_hard123, история, 8 лет назад, По-английски

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

AC CODE — http://codeforces.com/contest/688/submission/18818424

Thank you :))

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор code_hard123, история, 8 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится