Hello Codeforces,
It has been a long while, but in this project we close the long-standing open problem proposed by Umnik 2021. You can try it here (discontinued, see the new link below) while supplies last. Currently I only imported problems from Codeforces & BZOJ (the dead Chinese OJ) but adding other OJs should be easy as long as we have the statements crawled (PRs?). Cheers!
Update (8 months later): We finally got an update! In the new version I collected and uploaded most of vjudge (which means 160k problems!). It also got a shiny new domain http://yuantiji.ac. Enjoy! :D







,
kinds of hats with
.
,
, we can precalculate all possible
, then for every
, then
, its complexity is
.
.
,
, it's easy to arrive at such arrangements.
, try to query
, try to query
(for a segment of length
, and if the maximum is chosen, there are
.
solution.
).
)
.
),
,
, then
is palindromic. Similarly
is also palindromic. When
, so
, at least one of
, so 
. (Obviously, if
, we define
.
, if we let
, then
.