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.
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.
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 5 | Um_nik | 141 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | maroonrk | 133 |
| 9 | BledDest | 132 |
| 10 | qwexd | 129 |
| Название |
|---|



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... :( )
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.
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.