2019 FunctionCup

2019 FunctionCup

Contest page: https://fxcup4.cms.oj.uz/

Live Scoreboard: Scoreboard

Solution Sketch: Solution Sketch

  • Some of 0-point Bulb submissions are revised to 11-point. Sorry for imperfect contest.

Rules Summary

  • Statement Language: English, Korean
  • Programming language: C++17 (GCC 7.3)
  • Number of tasks: 12
  • Contest System: oj.uz wrapped with CMS template
  • Scoring system: Subtasks for each task, ties broken with time penalty (Atcoder format with no penalty for wrong submissions)
  • Duration: 5 hours
  • Scoreboard: Public, not frozen during the whole contest
  • Time: September 1st 13:00-18:00 (KST)
  • Max team size: 3, each member can use their own computers
  • How to register?: check here


There are 12 tasks. Among them, 11 tasks are IOI-style, which means we provide a library, and you have to write a function, just like in recent IOIs. Another 1 task is Output-only, which means you have to write a whole text file(s).


We will provide English and Korean statements.

You are only allowed to use C++17.


Each task will be divided into several subtasks, each worth a portion of the total points.

The scores will be calculated as follows:

  • For each submission, the score for each test case is calculated according to your program or output.
  • For each submission, the score for each subtask is the minimum of the scores for the test cases in the subtask.
  • The final score for each subtask is the maximum of the scores for this subtask across all submissions.
  • The final score for each task is the sum of the scores for its subtasks. This sum is rounded to the nearest 2 decimal places.

For example, consider a contestant who made two submissions on a task that contains two subtasks. If the first submitted solution got 30 points for the first subtask and 10 points for the second subtask, and the second solution got 0 points for the first subtask and 40 points for the second subtask, then the final score for this task will be 70.


Contestants must submit their solutions for tasks by using the grading system. To avoid overloading the grading system, there are two restrictions on the number of submissions:

  • Contestants may submit a solution to each task at most once per minute. Even in the last 15 minutes.
  • There is no limit on the number of total submissions.


Team X gets a higher rank than Team Y if and only if one of the conditions below holds:

  • The score of team X is larger than the score of team Y.
  • Both teams got the same score, and team X achieved that score faster than team Y.

Note that the number of submissions doesn't matter.

Champions for each task

The champion of task Z is determined as follows:

  • If there is a unique team X that got the maximum score of task Z among all competitors, team X is the champion.
  • If 2 teams got the maximum score of task Z among all competitors, the fastest team that managed to get that score is the champion.
  • However, if no team got positive score on task Z, there is no champion.

In the paragraph above, 'competitors' or 'teams' mean teams that are able to receive T-shirt prizes.


IMPORTANT: To be eligible to get a prize, you should be able to receive a parcel in South Korea. We don't afford to send T-shirts outside South Korea.

Four types of functionCup T-shirts will be given by the criteria below.

  • First prize: The winner will receive a pizza gifticon (one per team).
  • Champion: Champions of each task will receive T-shirts.
    • Colors differ by task: White for task no. 1-3, Navy for task no. 4-6, Gray for task no. 7-9, and Black for task no. 10-12. (one per each person)
    • If some team is a champion of multiple tasks, each member will be able to receive multiple T-shirts. However, they are not able to receive multiple T-shirts of the same color.
  • Special prize: If a team is not a champion of a certain task and satisfies some pre-defined condition during the competition, they can receive T-shirts. (one per each person) The condition will be revealed at the beginning of the contest. Four teams will be able to receive the special prize.

After the competition, if you are to receive a T-shirt, you should fill out a Google form with necessary information. We will order T-shirts on September 8th, and you should complete it before we order them. If you don't manage to fill out the form within the due date, you are not able to receive your prize.


There will be a live scoreboard. We will announce the URL of the scoreboard at the beginning of the contest.

We will not freeze the scoreboard. At the last moment of the contest, you could predict who would get the prizes.


Each team should consist of at most three people. The contest is open for everybody, regardless of nationality, age, and education. (this part is copied from IPSC 2018 rules)

Click the 'Register' tab to register. Read here to know how to register in teams.