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

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

Why in the suffix array is it necessary to put a character like '$' in the end?
I do not understand why it does not work if that character is missing!
Thanks in advance!

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

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

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

Hi everyone

I need help with this knapsack variant
Thanks

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

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

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

Hi everyone

What data structures are needed in competitive programming?
I know all stl structures, segment tree and BIT. But I have heard
others like treap, AVL tree, persistents, but I don't know if those
structures are really neccesary for competitive programming or
all their uses can be replaced by others and if not,
What are all the necessary data structures?

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

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

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

Someone who knows this subject. Could tell me where you studied it?
And recommend me some problems, please?

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

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

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

Hi everyone.

Lately I've done some combinatorial problems. And I am wondering.
What methods are used to calculate the binomial coefficients?
What is the most effective?

I have used dynamic programming, although it is effective for many
queries and can be modulated with any number, the range is too limited.


When the number is a bit higher, I have used modular arithmetic
but I need to precalculate all factorials and is needed a prime number
as a module and really the range is not so large just 10 ^ 5 maybe.
If the problem have higher numbers, I'm lost

Can you tell me what techniques you use and when they can be used are?
I hope you can help me
Thank you

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

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

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

All I have read about flows is Edmonds Karp’s Algorithm, which works for maximum flow, but I have seen that there are better algorithms than this one, and there are different problems that maximum flow (like mincost, dinic and others), I would like a list of all the topics and algorithms that are useful for learning network flow!

Thanks in advance!

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

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