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

Автор mr_warlock, история, 18 месяцев назад, По-английски

I am stuck on this following problem:

Statement:

Given n, r, x and P where P is a PRIME number.

Print the value nCr % P^x

Constraints:

1 <= r <= n <= 1e12
2 <= x <= 20
2 <= P^x <= 1e6

Thanks for reading the problem. It will be really helpful if you can give me a solution.

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

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

Автор mr_warlock, история, 19 месяцев назад, По-английски

I am stuck on this following problem:

Statement:

Given an array of size n and have to do q queries.

Query are---

Type-1) Update index k with value v.

Type-2) Print the unique count in range [L..R] which are less than v;

Constraints:

1<=n,q<=100000
1<=v<=1000000000
1<=k<=n
1<=L<=R<=n

Thanks for reading the problem. It will be really helpful if you can give me a solution.

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

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