Ternary Sequence(思维+贪心)Codeforces Round #665 (Div. 2)
原题链接:https://codeforces.com/contest/1401/problem/B测试样例:input3232331401230001001output420样例解释:Inthefirstsample,oneoftheoptimalsolutionsis:a={2,0,1,1,0,2,1}b={1,0,1,0,2,1,0}c={2,0,0,0,0,2,0}Intheseconds