CF353E Antichain
题目描述
有一个$n$个点($n
输入格式
一行一个长为$n$的01串,若第$i$位($i\in[0,n-1]$)是0则表示$i$到$(i+1)\%n$有连边,否则$(i+1)\%n$到$i$有连边。
输出格式
一行一个整数,图的最长反链。
说明/提示
Consider the first test sample. The graph's $ G $ edges are: $ 0→1 $ , $ 1→2 $ , $ 0→2 $ . We can choose the set of vertexes $ [0] $ as the maximum antichain. We cannot choose an antichain of larger size.