correctness of an algorithm

join shbcf.ru