The evil Bumbershoot corporation PRoduces clones for gruesome experiments in a vast underground lab. On one occasion, the corp cloned a boy Andryusha who was smarter than his comrades. Immediately Andryusha understood that something fishy was going on there. He rallied fellow clones to go on a feud against the evil corp, and they set out to find an exit from the lab. The corp had to reduce to destroy the lab complex.
The lab can be pictured as a connected graph with n vertices and m edges. k clones of Andryusha start looking for an exit in some of the vertices. Each clone can traverse any edge once per second. Any number of clones are allowed to be at any vertex simultaneously. Each clone is allowed to stop looking at any time moment, but he must look at his starting vertex at least. The exit can be located at any vertex of the lab, hence each vertex must be visited by at least one clone.
Each clone can visit at most
Your task is to choose starting vertices and searching routes for the clones. Each route can have at most
The first line contains three integers n, m, and k
Each of the next m lines contains two integers
The graph is guaranteed to be connected.
You should print k lines. i-th of these lines must start with an integer
It is guaranteed that a valid answer exists.
给定一个 n 个点 m 条边的无向图,k 个人每秒均可以从一个点到达直接相连的另一个点,问 k 个人每个人最多可以沿特定路径经过
一个借用了深搜的思维题。
对一个图进行深搜 n 个点,统计深搜过的点的次数,最多不会超过 2n 个(包括回溯)。
注意: 即使深搜出的路径点不足
新闻热点
疑难解答