Блог пользователя v-O_O-v

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

I have solved 285C - Building Permutation using a greedy approach i.e sort all the values and then count the number of moves to make first element 1, the next to 2 and so on... But how can we come to the conclusion that this is always optimal and produces the minimum number of moves?

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

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

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

So I was learning suffix array and how to implement it. I was not able to implement it myself so I took unused code for constructing suffix array I was able to understand the initial steps but was not able to understand what is happening after the 'Start' in code below. Please help me. Thanks.

Code

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

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

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

Hi, I started studying string alg's and I did not really understand how do we construct a suffix array in O(n*log n). I can implement an O(n^2 log n) alg. But it can fail for reasonably long strings. Can someone please provide a detailed implementation (if possible with comments) of the suffix array. I saw the codes of some users but I am not able to understand anything from it. Please help me. Thanks.

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

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

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

I recently started learning graph theory and I completed the traversal algorithms. I am having difficulties in implementing the code which are applications of the traversal. So can anyone share their implementation of basic graph questions like

  1. Check whether an undirected graph is acyclic if not print the cycle.
  2. How to get all paths from a source vertex to a destination in a Directed graph.

Thanks!

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

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

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

 Errichto has made to top 1 on the contribution panel.

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

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

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

214A - System of Equations Of course, we can do this using brute-force method. Does a better way exists please share it. Thanks.

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

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

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

Does anyone have a simpler approach of solving this problem? Please share with me.

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

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

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

Hello! I am unable to find any resource on implementing pick's theorem for a polygon in c++. Can anyone suggest me a site or code where i can understand it.

Thanks.

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

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