Bubble Cup 12 Rules
Bubble Cup is a team contest aimed at university and high school students. The goal of the contest is popularization of programming among students and additional training for international competitions. The contest consists of two parts – two online qualifying rounds in the spring and the final round held in Belgrade on 14^{th} of September.
Eligibility
Students (elementary, high school or university) born in 1995 or later, are eligible to compete in Bubble Cup. Like previous years, Bubble Cup 12 is open for both students in Serbia and abroad.
Students doing internship in Microsoft during Bubble Cup (starting from 1st April to the end of Finals in September) are not eligible to compete.
In order for a team to compete in the finals of Bubble Cup, the following must be obeyed:
 Each competing team consists of maximum three contestants
 Contestants can form a team during registration or later, but no later than 48h before the start of the second qualifying round

A team can either contain:
 Only university students
 Only high school and elementary school students and pupils (a team can contain a mix of high school and elementary school members)

For university teams, all team members must attend the same university (e.g. University of Belgrade)
 Team members can attend different faculties of the same university
 For high school and elementary school teams, team members can be from different schools
 Team is considered high school/university if at the start of Round 1 they are in high school/university
 After the first round, members are not allowed to switch teams
 All the members of a qualified team should be present in the finals. The organizers reserve the right to accept one substitute member per team, if the reasons for this are deemed justifiable for the organizers.
Qualifications
The qualification rounds are organized as follows:
 Organizers will post at least 8 problems for each round.
 First round starts 1st April 14:00 CET and lasts until 26th April 14:00 CET
 Second round starts 1st May 14:00 CET and lasts until 26th May 14:00 CET
There will be two divisions during Qualification rounds:
 Premier League
 Division opened to high school and university teams that satisfy eligibility rules mentioned above
 Rising Stars
 Division opened only to eligible Serbian high schools teams. Serbian high school teams can choose to compete in Premier league by contacting Bubble Cup organizers to change their default division by the start of Round 2.
Qualification problems
During qualification rounds both divisions with solve same problems. There will be separate qualification leaderboard for Premier League and Rising Star division. All teams from Round 1 will advance to Round 2, only difference being that problems in Round 2 will be much more challenging.
Qualification round problems are directly available on Bubble Cup website under “Competitors corner” section. The contestants will solve and submit the problems on Bubble Cup website using one of the following programming languages C#, C++ and Pascal. All problem inputs should be read directly from standard input and problem outputs should be written to standard output. Maximum number of submissions per team member per problem is 256. Intentionally creating multiple accounts for submission purposes will result in a team ban. Compiler versions of the programming languages used by Bubble Cup grader are:
 C++  MinGW 7.2.0
 C#  Visual Studio 2015
 Pascal  Free Pascal 2.6.4
 Python 2 and 3
Bubble Cup contestant will encounter two types of problems: challenge and classical problems.
For classical problems every accepted solution will be rewarded with one point in the Round 1, and two points in the Round 2. A team will get one point per problem in the first round and two points in the second round, if at least one of the members solves that problem.
For each solved classical problem, each team will receive additional bonus time for the finals, which will cancel with time accounted for the team in the finals. The total bonus in minutes will be computed according to the formula:
BonusTime = [n*n/4],
where n is the number of problems solved by the team, and [x] is the integer part of x. For the total time in the finals, we will use the following formula:
TotalTime = SpentTime + PenaltyTime – BonusTime.
Challenge problems do not have a known "best" solution. Solutions for these problems compete against each other, and scores are scaled relative to the best solution from all contestants (solutions from contestants in different categories will be scaled against each other).
Scores are going to be scaled according to the following formula(s):
score = maxPointForProblem * (1  (1  minimalSolution / solution)^a)
or
score = maxPointForProblem * (1  (1  solution/ maximalSolution)^a)
where constant a depends on the problem and maxPointForProblem will be different for Round 1 and Round 2. maximalSolution will be different for every division.
Member may submit multiple submissions for challenge problems and only the one with best score will be saved. Scores for this problem are going to be recalculated when new solution for that problem is submitted.
Team members can (and it is advisable to) work together, but sharing solutions with other teams is strictly forbidden. If two or more teams submit sufficiently similar solutions, after verification, both teams will be disqualified.
 Premier League
 The best 16 teams by Overall score from Premier League will be invited to the finals.
 Rising Stars
 The best 8 teams by Overall score from Rising Stars will be invited to the finals. Additionally, the best 4 teams by overall score from specialized IT departments will be invited to the finals if they haven't qualified already. The team is specialized IT department if all team members are from specialized IT department, not necessarily the same one.
Finals
Teams will compete in two divisions in the finals: Premier League and Rising Stars.
During the final round, the teams will be presented a set of at least 7 problems, for which they will have a total of 5 hours to solve. Problems will differ between the two divisions, but at least 5 problems will overlap. Each team will be provided with one PC. All the PCs will have sufficiently similar configurations. During the final round, the competitors will be allowed to communicate only with their team mates and the organizers.
Usage of any printed or electronic materials as well as the usage of mobile phones, calculators and computers other than the one provided by the organizers is strictly forbidden. Contestants will be provided with pen and paper. A reasonable amount of food will be provided, but the consumption should not disturb the other competitors.
Programming languages available in the finals are: C#.NET, C++ and Pascal. The compiler versions will be announced on the Bubble Cup website before the finals.
During the competition, the contestants will send the solutions to the judging system for grading. The system will compile and run the solutions against a set of predefined test cases. If the outputs for the test cases are correct, and the time and memory constraints defined in the statement of the problem are met, then the solution is considered correct, and the team is rewarded one point. If the solution is not correct, the team will get a response shortly, explaining the reason why the solution is rejected. In case of two teams scoring the same number of points, the team that spent less time for solving them is favored. Time spent for solving each problem is the time that passed from the beginning of the contest until the moment of sending the accepted solution for evaluation. For every rejected solution, a 20 minute penalty is added to the total time. The penalty is applied only if a correct solution for that problem is submitted before the end of the contest.
During the competition, the contestants can ask organizers for clarifications regarding any of the problems. If the response is different than “no comment”, the question and the response must be available to all teams.
Competitors retain ownership of all intellectual and industrial property rights for all the content created during the Bubble Cup finals.
The organizers reserve the right to change the rules of the competition, and they will inform the competitors via the official website, in a timely fashion.