Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
then you should type 200
Agree
then u want to output the answer (in python) use the return instead of print
i'm probably on the same case right now. any hints?
Согласен)
result.reserve(numbers.size()); после создания добавить
Yea true. I was rushing some 7s and 8s so I didn't think of such things :D
При проходе вперед заполняем результат по наименьшему значению расстояний вверх и вправо - относительно текущей клетки:
res[it] += std::min(res[it - 1], res[it - width]);
а при проходе назад расстояния вверх и вправо уже есть, поэтому вычисляется наименьшее среди всех направлений:
res[it] += std::min({res[it - 1], res[it - width], res[it + 1], res[it + width]});
что именно не понятно?
Do you speak Russian? I barely speak English.