Good day for everybody!!! Recently I found a very nice problem from NEERC 2003 about graphs. I don't have any ideas to solve. Thanks if anyone will write. problem B. Bring Them There http://neerc.ifmo.ru/past/2003/problems.pdf
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Good day for everybody!!! Recently I found a very nice problem from NEERC 2003 about graphs. I don't have any ideas to solve. Thanks if anyone will write. problem B. Bring Them There http://neerc.ifmo.ru/past/2003/problems.pdf
Name |
---|
Let it takes C days to deliver supercomputers. Use binary search to find it's value. To check "is it enough C days for deliver all K supercomputers" use maximum flow. The net looks like follows:
1) for each day i and each planet j there exist an edge from (i, j) to (i + 1, j) (space ship (or ships) stay at this particular solar system for one day)
2) for each day i, and two planets (x, y), if exists tunnel between x and y, there is an edge from vertex (i, x) to (i + 1, y) and the edge from (i, y) to (i + 1, x) (the capacity of both edges is 1 unit).
If value of maximum flow from (0, S) to (C, T) is bigger than or equal K, we can deliver K supercomputers for C days.
To avoid ships to move in opposite directions using the same tunnel, you can use additional edge for each pair of edges from 2).
It can be implemented without using additional edges. It is not necessarily if first edge to check in your DFS is edge from 1)
Thank you very much