CSES has several really hard graph-related tasks, for example
- New Flight Routes with directed graph (btw this task was borrowed from russian olympiad contest)
- Forbidden Cities with undirected graph
It would be a good idea to visualize those graphs. One of well-known tool to do this is Graphviz, so I wrote simple perl script to render graph from CSES plain text into their DSL. On small graphs all goes well and we can enjoy with something like
But seems that on big graphs with 200k nodes dot just can`t finish rendering and after ~2 hours of hard work met with OOM killer. Lets think how we can reduce size of graph
