![[CF EDU72D] Coloring Edges](/img/banner1.png)
[CF EDU72D] Coloring Edges
You are given a directed graph with n vertices and m directed edges without self-loops or multiple edges.
Let’s denote the k-coloring of a digraph as following: you color each edge in one of k colors. The k-coloring is good if and only if there no cycle formed by edges of same color.
Find a good k-coloring of given digraph with minimum possible k.
分析
对我这个菜鸡来说,去染色返祖边的操作并不怎么显然……算了……
没能坚持只有2种颜色的猜想。挂城墙。
没必要挂代码。
本文是原创文章,采用CC BY-NC-SA 4.0协议,完整转载请注明来自CC's
评论