IOI'94 - Day 2 - Problem 1: The Clocks

Competition Rules

Problem Statement

Example input and output files from the problem statement (see below for format of output file): There are 5 tests. Each successfully completed test gives 6 points. Therefore the maximum number of points for this problem is 30. The maximum execution time is 30 seconds per test.

Test Data

N.B.The following test data were not available during the competition. They were used to judge the programs of the competitors after the competition.

It turns out that the order of moves is irrelevant for the result. Therefore, the order in which moves are presented in the output file is free. The test output files contain the moves in one order only; all permutations, however, are correct too. White space between digits is ignored by the judging program (it may be present, but need not).

  1. Input / Output (3 moves)
  2. Input / Output (10 moves)
  3. Input / Output (19 moves)
  4. Input / Output (24 moves)
  5. Input / Output (27 moves)

Analysis and Solution