 competing as individuals in this special online round!
JSC VTB Bank was founded in 1990, and its subsidiary banks and financial organisations (VTB Group or the Group) are a leading Russian financial group, offering a wide range of financial and banking services and products in Russia, the CIS, and a number of countries in Europe, North America, Asia, and Africa. VTB Group has the most extensive international network among all Russian banks, including more than 30 banks and financial companies in more than 20 countries.
The round will contain 9 problems, and you will have 3 hours to solve them. Problem authors are GlebsHP, Vovuh, PikMike, Sahaand and me.
We wish all of the participants good luck! Hope all of you will find something interesting in this contest.
UPD: Editorial is here.
1341 successful hacks and 1475 unsuccessful hacks were made in total!
On March 06, 18:05 MSK Educational Codeforces Round 39 will start.
This is a special Educational Round — Top three contestants among those who are eligible for participating in ACM ICPC will be invited to attend the Hello India x Russia Programming boot camp under the Codeforces + SDV banners, on a full team sponsorship.
Social Discovery Ventures (SDV) creates, develops and funds Internet projects specialising in communication platforms that enable people across the world to get closer and expand their social networks.
The winners will be fully sponsored with their boot camp participation fees, accomodation, and meals for the India location!
This round also has a special regional prize — the company Phaze Ventures, a platform founded to transform the region by unlocking the untapped potential of our youth, startups and corporates, will be sponsoring the top 3 participants of this round from Oman (also among those who are eligible for ACM ICPC) — further sharing the importance of supporting talented programmers and sending them to these types of events throughout the world.
You will be given 7 problems and 2 hours to solve them. Problem authors are PikMike, Vovuh and me.
Good luck to the participants! Hope you will enjoy the contest.
UPD: The tutorial has been published.
Hint 1: Count the number of times each number appears in the sum of all fa.
Hint 2: Try to find a sufficient and necessary condition that ai appears in fa of a permutation.
Hint 3: Prove that ai appears if and only if all elements appearing before it are strictly less than it (other than the largest element). And then try to solve the problem first in O(n2).
Now try to solve to simplify your solution with O(n2).
By determining the index of ai, if it is on the index j then we have to choose j - 1 of the li elements smaller than it and then permuting them and then permuting the other elements. We can find all li with complexity of O(n log n). If we were to implement this, the complexity would equal to O(n2).
of which can be easily implemented in O(n log n). Make sure to not add the answer for maximum number in the sequence.
There is also another solution that you can read here.
Let's denote n = |s|.
Hint: There is a simple solution: dp[m][mask] — best answer if we considered first m characters of the string and a mask of erased substrings. However, storing a string as a result of each state won't fit neither into time limit nor into memory limit. Can we make it faster?
Let's try to apply some greedy observations. Since each state represents a possible prefix of the resulting string, then among two states dp[m1][mask1] and dp[m2][mask2] such that the lenghts of corresponding prefixes are equal, but the best answers for states are not equal, we don't have to consider the state with lexicographically greater answer. So actually for every length of prefix there exists only one best prefix we will get, and we may store a boolean in each state instead of a string. The boolean will denote if it is possible to get to corresponding state with minimum possible prefix.
To calculate this, we iterate on the lengths of prefixes of the resulting string. When we fix the length of prefix, we firstly consider dynamic programming transitions that denote deleting a substring (since they don't add any character). Then among all states dp[m][mask] that allow us to reach some fixed length of prefix and have dp[m][mask] = true we pick the best character we can use to proceed to next prefix (and for a fixed state that's actually (m + 1)-th character of the string).
This is, but in fact it's pretty fast.
This is a more complex version of problem G from Educational Round 27. You can find its editorial here.
To solve the problem we consider now, you have to use a technique known as dynamic connectivity. Let's build a segment tree over queries: each vertex of the segment tree will contain a list of all edges existing in the graph on the corresponding segment of queries. If some edge exists from query l to query r, then it's like an addition operation on segment [l, r] in segment tree (but instead of addition, we insert this edge into the list of edges on a segment, and we make no pushes). Then if we write some data structure that will allow to add an edge and rollback operations we applied to the structure, then we will be able to solve the problem by DFS on segment tree: when we enter a vertex, we add all edges in the list of this vertex; when we are in a leaf, we calculate the required answer for the corresponding moment of time; and when we leave a vertex, we rollback all changes we made there.
What data structure do we need? Firstly, we will have to use DSU maintaining the distance to the leader (to maintain the length of some path between two vertices). Don't use path compression, this won't work well since we have to do rollbacks.
On February 02, 17:35 MSK Educational Codeforces Round 37 will start.
As usual, the round will be rated for Div. 2. It will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally. You will be given 7 problems and 2 hours to solve them.
The problems were prepared by Mikhail PikMike Piklyaev, Vladimir Vovuh Petrov, Adilbek adedalic Dalabaev and me. One of the problems was proposed by unbelievable02.
We are happy to announce the addition of two new coaches to our Hello India x Russia Programming Bootcamp: Gleb GlebsHP Evstropov, Artem VArtem Vasilyev and Filipp DPR-pavlin Rukhovich will all be attending at our India location, Amrita School of Engineering.
We look forward to seeing you all there this spring! For those of you who haven't registered, there's still time.
The Early Bird discount will be set at 20% for those who register before February 12th, 2018.
UPD. Editorial is here.
On November 23, 18:05 MSK Educational Codeforces Round 33 will start.
Combinatorics and graphs with Sergey Nikolenko, Researcher, Steklov Mathematical Institute at. St. Petersburg. He is a computer scientist with vast experience in machine learning and data analysis, algorithms design and analysis, theoretical computer science, and algebra.
Algorithms and Data Structures with Edith Elkind, Professor University of Oxford, Department of Computer Science. She researches game theory and the computation of social choices. She looks at the decisions involved in multi-agent systems such as auctions, elections and co-operative games.
Big Data Analysis: Mapreduce, Spark, BigTable/HBase, Distributed Data with Pavel Klemenkov and Alexey Dral. With HDFS, MapReduce, Spark, and NoSQL, students will master and sharpen their knowledge in basic technologies of the modern Big Data landscape.
Parallel and Distributed + High Performance Computing with Dalvan Griebler. The name says it all. Learn how to run your programs faster.
The round will be unrated for all users and will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.
The problems were prepared by Mikhail PikMike Piklyaev and me.
Thank you for taking part in the 2nd Hello Barcelona Programming Bootcamp in collaboration with Moscow Workshops ACM ICPC. It was a pleasure to have you on board. We hope you enjoyed it and we would love to have you back next time.
Congratulations ITMO and Harbour.Space University teams for winning divisions A and B! It was amazing watching the scoreboard throughout all nine days as teams from New South Wales, Saint Petersburg, Tokyo, among many others, challenged the top spots. Watch the recap here!
Lecturing both divisions A and B, Andrey brought a vast wealth of knowledge to the boot camp, and shed light on how to better tackle the problem sets that teams will face in their upcoming regional competitions.
Leisure day was a full one, with bus city tours, to gaming, to lectures and workshops. We had many special guests Sberbank, including Alexey Dral, who talks about the impact of a