##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
| # | Title | Points | Solved | Admin | |
|---|---|---|---|---|---|
You are given a simple directed graph with vertices and edges. The vertices are numbered from to , and the edges are numbered from to in the order in which they appear in the input.
The graph has the following properties:
Choose some of the given edges so that the directed graph formed by the chosen edges, on all vertices, is strongly connected.
In the Hard Version, if the number of chosen edges is , it must satisfy .
Output followed by distinct integers , the indices of the chosen edges, in any order.
Your output must satisfy , and the graph formed by the chosen edges must be strongly connected.
The integers may be separated by arbitrary whitespace.
The chosen edges form the directed cycle . Therefore, the chosen subgraph is strongly connected.