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

Автор toxic_hack, история, 4 года назад, По-английски

The problem is very simple:

Count the number of permutations of length $$$N$$$ where the maximum length of an increasing subarray is exactly $$$K$$$.

where: $$$1 \leq K \leq N \leq 200$$$.

I am stuck in this problem for days. It would be really great if someone could help me out here.

LINK

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

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

Автор toxic_hack, история, 4 года назад, По-английски

I have been trying to solve (Kth problem in the pdf) this problem for a couple of days. I find this problem very hard and the DP states and transitions are too confusing for me. I don't know how to go about thinking these types of problems :( Can someone please explain how to approach this problem? It will be very helpful.

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

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

Автор toxic_hack, история, 4 года назад, По-английски

Can someone help me in solving this question BOI16_swap.

You are given a sequence of n numbers $$$x_1, x_2, ..., x_n$$$. Each number appears exactly once in the sequence. You can modify the sequence using swaps. There are $$$n - 1$$$ consecutive turns numbered $$$k = 2, 3, 4, ... n$$$. On turn you can either swap values $$$x_k$$$ and $$$x_{k/2}$$$ in the sequence or do nothing. What is the lexicographically minimal sequence you can obtain? $$$n \leq 2 * 1e5$$$

Spoiler

Thanks!

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

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

Автор toxic_hack, история, 4 года назад, По-английски

I've been wanting some good easy to use geometry struct for a long time (in C++). It seems to be impossible to find. Everything that I see either doesn't contain enough functions or is very tough to use. It will be very useful if any of you could share your geometry library with me. Thanks

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

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