Pergunta de entrevista da empresa Yandex

Dynamic programming and STL tasks. I got only algorithm questions, analysis of their running time.