NeverSee's blog

By NeverSee, history, 4 years ago, In English

Hello I Have a question about directed tree, I wanna to Know find the number of topological-sorts of a directed tree in O(N ^ 2)
UPD : can help me for better order Look O(nlgn)
sorry about my bad english

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By NeverSee, history, 4 years ago, In English

I want to calculate c(i, j) that mine (select j person from i person) for all i & j <= 1e4 mode n that if n is prime i know that the answer is use inversion but in this n is not prime and for
c[i][j] = c[i — 1][j] + c[i — 1][j — 1] is memory limit
sorry for my english.

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it

By NeverSee, history, 4 years ago, In English

Have a DAG and we want that for each node v find the number of vertex that existence a path from v to that vertexes
for n <= 1e5

Full text and comments »

  • Vote: I like it
  • -10
  • Vote: I do not like it

By NeverSee, history, 4 years ago, In English

I have one question that have a weighted directed graph with n vertex and m edge the goal is find the minimum walk from two vertex v & u with length k.
n <= 200 & m <= n * (n — 1) / 2 & k <= 1e9

Full text and comments »

  • Vote: I like it
  • -19
  • Vote: I do not like it