CF 1830C - Hyperregular Bracket Strings

Rating: 2400
Tags: combinatorics, greedy, hashing, math, number theory, sortings
Solve time: 1m 14s
Verified: no

Solution

Working