Greetings Codeforces community!

We are excited to announce the Constructor Open Cup 2025, our annual online programming competition organized by Constructor University and JetBrains.
What is the Constructor Open Cup 2025?
Constructor Open Cup is an online contest organized by Constructor University and JetBrains, the global leading tool provider for developers, to promote interest in computer science, data science, software development, and software engineering.
Put your knowledge and skills to the test in this 4-hour competition and stand a chance to walk away with a scholarship for a bachelor's degree in Software, Data and Technology (BSc SDT) at Constructor University, Germany’s #1 private university*!
Constructor Open Cup timetable
January 27 – February 5, 2025 | Practice Round
Get familiar with the testing environment during this practice round.
February 6, 2025, at 2 PM (UTC) | Main Round
You will have 4 hours to complete a series of algorithmic programming tasks. Registration closes 1 hour before the start of the contest.
Prizes and Winner Announcement
The top candidates will receive exciting prizes, including:
- chance to get scholarships for the BSc SDT*
- exciting memorable gifts from Constructor University and JetBrains
*The winners who applied to the BSc SDT will receive an email to schedule the interview with Constructor University and JetBrains.
How can I participate?
- Register your details on the webpage.
- Finalize your registration at Codeforces using the link you receive in the confirmation email.
- If you have any further queries, please reach out to talent@constructor.university.
How can I prepare?
Prepare for the Constructor Open Cup 2025 with an online webinar on January 29 at 17:00 CET. Our expert will go over the problems from last year’s competition and share helpful tips.
- January 29 at 17:00 CET
- Link to join the webinar
Don’t forget to save the date! What do participants say?
“I was just surfing Codeforces blogs when I found a post about the Constructor Open Cup 2023. After discovering that I could have a chance to win a scholarship from JetBrains, I registered for the competition and placed among the top 20-30. The contest itself was very interesting, with different types of problems that allowed me to showcase my knowledge. I felt very honoured to receive a scholarship, and now I am one of the students in the BSc SDT program” – IMRUN, BSc SDT second-year student.
"Though I hadn’t participated in competitive programming contests for a while, I decided to try the Constructor Open Cup to have a chance at earning the JetBrains Scholarship. The contest was challenging and interesting, but I wasn’t sure if I would progress far enough to secure the scholarship. However, I was invited to an interview and was offered the opportunity to study in the BSc SDT program with the scholarship. I’m glad that I decided to participate in the Open Cup contest. It was a good challenge and an amazing opportunity at the same time!" – Olesya, BSc SDT first-year student.
Can I participate?
Everyone is welcome! The contest is open for all ages and skill levels, all you need is a passion for coding.
To get the chance for the scholarship for BSc SDT, please check Constructor University’s eligibility requirements.
About the BSc SDT program
This program prepares talents to become tomorrow’s elites in software development, programming languages, data analysis, and machine learning. You will benefit from the latest insights and knowledge from top industry partners and get the right skills needed for these rapidly changing industries. Learn more about the program here.
About Constructor University
Founded in 2001 as a private, English-language campus university, it repeatedly achieves top results in national and international university rankings. Constructor University aims to transcend the traditional academic approach by combining educational fundamentals with project-based pedagogy and the latest in digital tools. It equips the young professional elites with the right skills and knowledge to address today's challenges and thrive in the job market.
About JetBrains
JetBrains is a global software company that creates professional software development tools and advanced collaboration solutions trusted by more than 15 million users worldwide. Since 2000, we have built a product catalogue that covers all stages of the software development cycle, major technologies, programming languages, and educational processes.
The product range includes award-winning tools, such as IntelliJ IDEA, PyCharm, ReSharper, and PhpStorm, and productivity-enhancing team tools like YouTrack, TeamCity, and Datalore. JetBrains is the creator of Kotlin, the officially preferred language for Android™ development.
I study in this University and I really like it
This message was deleted.
Feedback: I'm not interested in the scholarship, I just want to participate in the competition for fun. So it is rather annoying that i have to "consent to receive updates on scholarships, events, study programs, and marketing communications from Constructor University" to be able to participate.
We asked for your consent to communicate so we can send you reminders about the practice round and main round. Feel free to unsubscribe from the email communication at the bottom of the emails :)
Great
Is this contest going to be hosted on Codeforces? If so, will it be rated for div 1?
It's not rated.
I'm not interested in the scholarship, I just want to participate in the competition for fun.
Will you post an editorial for the practice round?
Editorial of Constructor Open Cup 2024 is happening now: https://www.youtube.com/live/S0SsTkrK2kk
For the practice round, I clicked the link from the email and logged in.
It's showing this error message: "This page is unavailable in a Codeforces group"
To participate in the Constructor Open Cup, begin by registering on the official competition webpage. After completing your registration, you will receive a link to the Codeforces group for further sign-up. Please do not use your regular Codeforces account for this event; you specifically need to register for the Open Cup.
Thanks. I'm able to access the contest.
Is there any possibility to apply for a master's degree? I see the option in the application form, but there is no information about it.
The application process for the MSc AST scholarship was different. The deadline for submitting applications for MSc scholarshiphas already passed, and we are currently reviewing all applications.
If you are interested in this program, please email us and attach your motivation letter and CV. We will do our best to consider your application. Participation in the Constructor Open Cup can positively impact the review process.
can we upsolve the problems later on?
Excuse me, how to solve J (the interactive problem)? Thanks a lot.
The problem was inspired by the Boyer--Moore majority vote algorithm, so if you are familiar with it, you will see some similarities.
Process the array from left to right, keeping all unpaired elements in a stack. When we process an element, we try to pair it with the element on top of the stack if possible. So, if the stack is empty, or the element on top of the stack is equal to the current element of the array we are processing, we push the new element into the stack; otherwise, we pop the topmost element and form a pair. This phase requires at most $$$n-1$$$ queries.
After this phase, there are some elements in the stack which don't have a pair, and all other elements are paired. All elements in the stack are equal, since for every two adjacent elements in the stack, we tried to form a pair using them and failed. Let's call this element on top of the stack $$$x$$$ (if the stack is empty, then clearly we have already formed enough pairs).
For every two elements that don't have a pair yet, we will try to split one of the existing pairs and form two new pairs using these two elements. So, if there is a pair $$$(a, b)$$$ that we have already formed, we can try to split it and form two pairs $$$(a, x)$$$ (or $$$(x,a)$$$) and $$$(b, x)$$$ (or $$$(x, b)$$$). However, in order to do this, we must make sure that $$$a \ne x$$$ and $$$b \ne x$$$.
We can compare the topmost element in the stack with every other element in the array. This uses $$$n-1$$$ queries and tells us which elements are equal to $$$x$$$, which are less than $$$x$$$ and which are greater. Then, if there are $$$m$$$ elements in the stack, we need to split $$$\frac{m}{2}$$$ already formed pairs which do not contain $$$x$$$.
If there are at least $$$\frac{m}{2}$$$ such pairs, we can just split them and use them to pair the elements from the stack. Otherwise, we can prove that it is impossible to split the array: there are $$$m$$$ remaining elements equal to $$$x$$$ and $$$\frac{n-m}{2}$$$ pairs, less than $$$\frac{m}{2}$$$ of which are formed by elements not equal to $$$x$$$. So, $$$x$$$ is present in at least $$$\frac{n-2m}{2} + 1$$$ pairs, and there are $$$m$$$ unpaired occurrences of $$$x$$$, which means that more than half of the elements are equal to $$$x$$$ — so, it is impossible to form the pairs.
This solution spends at most $$$2n-2$$$ queries.
Hey everyone! I just wanted to ask, when will the solutions for all the questions in this round be released?
Thanks in advance!
just open the contest's website and log in, then you will find it on the homepage.
Got it!!! Thank You.
Dear ConstructorU, I wonder when the invitation for students for this tour will be released.