Hello! My name is Alexander Kurilkin, and I am teaching a course on algorithms at ShAD Helper. In this post, I will analyze several tasks from the entrance exams of past years, so that you can see what awaits you and understand what we can teach you in our course. I hope that you share my love for interesting tasks on algorithms and will receive sincere pleasure from reading this post! So, let's get started ...

05/28/2016, No. 4
Are given segments . We call the segment nesting indexthe number of segments that contain it. Suggest an algorithm that determines whether there is a segment in the set with a nesting index exceeding 1000. The time limit is, for additional memory - .
Decision, "". , - , , - , . " ", , " ", . . , 1. , 1000, , β 1000 . β - , , . , (std::multiset C++), . , β 1000 . , , , , *set.begin(), ( 1000 ) . , ! , , . , . , , !
: 1000 ? , - 1000 , 1000 , - , ? , - 1000 , , , , , .
, . , O(n) . , : . .
05/25/2019, No.4
An array of real numbers is given . Suggest an algorithm that finds for each elementindex of the element closest to the right, at least twice its size. If there is no such element, then the value should be returned.. Time limit, for additional memory - .
Decision. ( ), , . . , , , ? , . , , , ? . , . , . , , ? , ( ) . (, , std::vector) , . , ( ), , .
, , ? , O(n), , , . , , , .
06/10/12, No. 5
In the set of each person may or may not know the other (if knows , it does not follow that knows ) All acquaintances are given by a Boolean matrix. β , , . , , . β , β .
, - - , 0 .
, , - , - , - , , - , - .
: β . , 1, , . , ( 0), , , , , - ( , , ). - β , . 1, , , . , . , , , ( ), , , , . , , , , , . : . , , (, ), . !
, , !
2019, -, D
, 2
: 2
: 256Mb
. Β« 1Β». .
β , . , .
. , , .
β (. , , . , , ().
β (). (). , . .
numbers separated by spaces or line breaks - the weight of the minimum spanning tree after each request.
Decision, , 99% . .
" ", . ( . , , , , , Μ ), , 1. . , , . , , , link-cut tree, , ( ). .
1 10, 10 ( , ). - . . : , ( ) , , . , , , , .
1 . - . , - . , , , . , - , 1. - , , .
, , ? , . , Accepted :)