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

Автор Mark_Fan, 14 лет назад, По-английски

http://acm.timus.ru/problem.aspx?space=123&num=9&contest=true

I cann't not understand what the author really wants us to do?How to convert it into a pratical problem.

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

»
14 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

You are given a graph, which consists of n vertices and edges like 2 -> 1, 3 -> 2, 4 -> 3 etc. You have to calculate number of arrangement of edges, by which you can get from 1-st vertex to n-th. Also in each arrangement from each vertex there must go out only 1 edge. (sorry for my poor english... :( )

»
14 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I want to know if the author means that we must get from the initial state of one coin to the final state of n coins and we shall determine how many permutations could produce that.

»
14 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

After all flavoring removed: Find the number of graphs of n vertices where the outdegree of each vertex is 1, such that when taking its union to the graph (2->1, 3->2, 4->3, ..., n->(n-1)) there is a directed path from the first vertex to the n-th vertex.

b_kasenov's interpretation is slightly incorrect; coins can disappear, hence the required union step. For example, for n=4, the graph (1->3, 2->4, 3->1, 4->2) satisfies the condition since we can go following the path 1->3->2->4, taking a wait on 3 coins to let it decrease to 2 first.