Asia-Pacific Informatics Olympiad 2016

These Competition Rules cover Problems, Competition Procedures and Grading Procedures in APIO 2016. Delegation Leaders have the responsibility of ensuring that all members of their delegation fully understand these rules and abide by them.


All problems in APIO 2016 are designed to be algorithmic in nature, and they are all of the traditional programming type.

  • In APIO 2016 competition, there are 3 problems to solve.
  • Solution comprises a single source file of a computer program which either reads data from the standard input (stdin) and writes its answer to the standard output (stdout) or implents a function.
  • The problem statement will define:
    • The problem description
    • Input and output data formats
    • The input value ranges / constraints
    • The resource limitations for the computations (e.g. CPU time, memory limitations)
    • Subtasks description:
      • Point for completion of this subtask
      • The input value ranges / constraints for this subtask
    • Any other constraints on the problem

Input and Output Data

  • In all problems, input and output data consist of one or more lines.
  • Each line ends with an end-of-line character, including the last line.
  • The end-of-line character in Linux is represented by the single character '\n' (ASCII code 10).
  • Each line contains one or more space-separated items.
    • An item is a string of printable non-white-space characters (ASCII code from 33 through 126, inclusive).
    • An item may represent an integer or a general string; the meaning of each item will be given in the problem description.
  • The format and limits for input and output data will be specified in the problem description. The output data should be formatted strictly according to the problem-specific instructions.

Stack Limitations

Whenever any submitted program is executed through the contest system, the stack size will only be limited by the memory limit for the corresponding problem.

Competition Procedures

  • Contest runs for 5 hours.
  • You can submit clarification requests in the first 2 hours.
    • You can submit it in English or your native language.
    • If you submit in native language, your leader needs to translate it to English, then we can answer it only in English.
  • If there need to be announcements, the announcement will be sent to the leaders. The leader of each country is responsible for making sure that the contestants are informed of the announcements, translated into local language if necessary.
  • Do not attempt to break or hack the system. We track every activity in the system. Any deliberate attempt will be considered as cheating.
  • Please do not share the problems after the contest within 2 days, because competition is not held within a same time range.


  • You can only submit at most 30 submissions for a problem.
  • You will get full feedback for each submission.
  • For each problem, there are several subtasks:
    • For each subtask, there are points assigned to it.
    • Each subtask contains several test cases.
    • You get the points from that subtask if the program passes all the test cases in that subtask.
  • The score of a submission is the sum of all the points that you get from completing subtasks.
  • The final score for a problem is the maximum of all the submission scores for that problem.