Asked at Hudson River Trading
Theory: Algorithms Under a Complexity BoundRead the problem, hints and solution here. The editor needs a bigger screen: open this page on a laptop to write and run your code.
Available in Python and C++. You are solving it in C++. Switch to Python
xxxx x xxxxxxxx xxxxxxx xxxxx xxxx xxx xxxx-x xxxxxxxxxxxxxx xxxx xxxx xxx xxxxxx x xxx x. xxx xxxxxxx, xx xx (xxx_x), xx xx xx xxxxx, xxx xx xx (xxx_x), xx xx xx xxx.
xxxxxxxxx xxxxx_xxxxx(x) xxxxxxxxx xxx xxxx xxxxx xxxxxxxx xxx xxxxxxxx
xxxx xxxx (x). xxxx xx xxx xxxxxxxx, xx xx xx xxxxx xxxxxxx.
xxxxx_xxxxx(x)
# x
xxxxx_xxxxx(xx)
# x (x, x xxx x, xxxxx xxx x, xx xxx xx xx xxxx x)
xxxxx_xxxxx(xx)
# x (x, x, x, xx xxx xx; xx xxxxxx xxxxxxx xx xx xxxx xxxx xx)
xxxx xxxx xxxxx_xxxxx(xxxx xxxx x);
This problem is only available to subscribers.