J - Divide and Sort Editorial by beet

7 手(未証明)

大胆予想①: 操作対象として prefix と suffix だけ考えればいい

大胆予想②:意味のある操作の中で一番長い区間を選べばいい

証明:AC

posted:
last update: