Statistics

Problem Statement for "LogarithmCircuit"

Problem Statement

A logic circuit is a collection of wires and logic gates. Each wire carries a value: either 0 (false) or 1 (true).

All gates in our circuit are binary (i.e., have two inputs).

There are four allowed types of gates: OR, AND, XOR, and NAND. They have the usual behavior (see Notes if you need it in writing). Each gate sets the value for its output wire from the values of its two input wires.


We will use N to denote the number of input wires in a circuit and G to denote the number of gates.

The input wires are numbered from 0 to N-1. The gates are numbered from 0 to G-1. The wire that is the output of gate x has the number N+x. For each gate, each input wire must have a number smaller than its output wire.

(A wire can be connected to inputs of multiple gates. The same wire can be connected to both inputs of a gate.)


The circuit computes the values on wires N to N+G-1 from the values on wires 0 to N-1.

This computation is done as a sequence of discrete operations, performed as quickly as possible in parallel in synchronized steps. That is, in each step each gate for which we already know the values on both its input wires sets the value for its output wire.

The number of steps needed to compute the values on all wires is the time complexity of the circuit.


You get to specify which wires and in which order form the output of your circuit.

A sequence of wires A[0], ..., A[K-1] can be seen to encode a binary number A = sum( (value on wire A[i]) * 2^i ).

The number encoded by the input wires, in order from 0 to N-1, will be called the input value and denoted IV.

Similarly, the number encoded by the output wires will be the output value OV.


You are given the number N of input wires. Construct a small and fast logic circuit that will compute the floor of the binary logarithm of the N-bit number given as the input. That is, for any IV > 0 the circuit must have OV = floor( log2( IV ) ). If IV = 0 (i.e., all input wires have zeros), OV may be arbitrary.

Your circuit must fit into the following constraints:

  • Its time complexity is at most 11.
  • Its number of gates is at most 200.
  • Its number of output wires is at most 10.

The code of a single gate is a triple {type, input1, input2}, where type is OR=47, AND=48, XOR=49, NAND=50, and the two remaining numbers are the numbers of its input wires.

Return a int[] of the following form:

  • { G,  code of gate 0, code of gate 1, ..., code of gate G-1,  number of output wires,  list of output wires }

(In the list of output wires, the output wire that is the least significant bit of OV should be given first.)

Definition

Class:
LogarithmCircuit
Method:
construct
Parameters:
int
Returns:
int[]
Method signature:
int[] construct(int N)
(be sure your method is public)

Notes

  • An OR gate returns 1 if and only if at least one input is 1.
  • An AND gate returns 1 if and only if both inputs are 1.
  • A XOR gate returns 1 if and only if its inputs differ.
  • A NAND gate returns the opposite of what an AND gate would return.

Constraints

  • N will be between 1 and 19, inclusive.

Examples

  1. 1

    Returns: {1, 50, 0, 0, 1, 1 }

    There is a single input wire. As we do not care about IV = 0, the only case we care about is the case when the input wire has value 1 and thus IV = 1. In this case, log2(IV) = 0 and therefore OV should be 0. Our returned network is shown below. The values [x] are wire numbers. +---------+ +---| gate 0: | | | NAND |--[1]--- --[0]---+---| | +---------+ A circuit with no output wires always has OV = 0. Such a circuit would also be a correct answer for N = 1. So, for example, the return value {0, 0} that describes a circuit with no gates and no output wires is also a correct solution for this test case.

  2. 2

    Returns: {4, 47, 0, 1, 48, 0, 1, 50, 0, 1, 48, 3, 4, 2, 1, 5 }

    There are two input wires. If IV=1 our circuit should have OV=0, and if IV=2 or IV=3 our circuit should have OV=1. The returned circuit has two output wires. The second output wire (wire 5) will always have the value 0, so it doesn't influence the answer. Here's a textual description of the returned circuit: input wires: 0, 1 gate 0: wire[2] = OR( wire[0], wire[1] ) gate 1: wire[3] = AND( wire[0], wire[1] ) gate 2: wire[4] = NAND( wire[0], wire[1] ) gate 3: wire[5] = AND( wire[3], wire[4] ) output wires: 1, 5 output value: wire[1] * 2^0 + wire[5] * 2^1 The time complexity of this circuit is 2. In the first step we can evaluate gates 0, 1, and 2 (which sets values on wires 2, 3, and 4), and then in the second step we can evaluate gate 3.

  3. 3

    Returns: {5, 47, 0, 1, 47, 1, 2, 47, 3, 2, 49, 5, 4, 49, 4, 2, 2, 7, 2 }

  4. 4

    Returns: {10, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 4, 6, 47, 5, 3, 49, 7, 8, 49, 8, 6, 49, 6, 3, 47, 10, 3, 47, 11, 3, 2, 12, 13 }

  5. 5

    Returns: {14, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 5, 7, 47, 6, 8, 47, 7, 4, 47, 9, 4, 49, 12, 10, 49, 10, 11, 49, 11, 8, 49, 8, 4, 47, 14, 16, 47, 15, 16, 3, 17, 18, 4 }

  6. 6

    Returns: {20, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 6, 8, 47, 7, 9, 47, 8, 10, 47, 9, 5, 47, 11, 10, 47, 12, 5, 49, 15, 16, 49, 16, 13, 49, 13, 14, 49, 14, 10, 49, 10, 5, 47, 18, 20, 47, 22, 5, 47, 19, 20, 47, 21, 5, 3, 23, 24, 25 }

  7. 7

    Returns: {26, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 7, 9, 47, 8, 10, 47, 9, 11, 47, 10, 12, 47, 11, 6, 47, 13, 17, 47, 14, 12, 47, 15, 6, 49, 18, 19, 49, 19, 20, 49, 20, 16, 49, 16, 17, 49, 17, 12, 49, 12, 6, 47, 22, 24, 47, 27, 26, 47, 23, 24, 47, 29, 6, 47, 25, 26, 47, 31, 6, 3, 28, 30, 32 }

  8. 8

    Returns: {33, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 8, 10, 47, 9, 11, 47, 10, 12, 47, 11, 13, 47, 12, 14, 47, 13, 7, 47, 15, 19, 47, 16, 20, 47, 17, 14, 47, 18, 7, 49, 21, 22, 49, 22, 23, 49, 23, 24, 49, 24, 19, 49, 19, 20, 49, 20, 14, 49, 14, 7, 47, 26, 28, 47, 30, 7, 47, 32, 33, 47, 27, 28, 47, 31, 7, 47, 35, 36, 47, 29, 30, 47, 31, 7, 47, 38, 39, 3, 34, 37, 40 }

  9. 9

    Returns: {38, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 9, 11, 47, 10, 12, 47, 11, 13, 47, 12, 14, 47, 13, 15, 47, 14, 16, 47, 15, 8, 47, 17, 21, 47, 18, 22, 47, 19, 23, 47, 20, 16, 47, 21, 8, 47, 24, 8, 49, 29, 25, 49, 25, 26, 49, 26, 27, 49, 27, 28, 49, 28, 22, 49, 22, 23, 49, 23, 16, 49, 16, 8, 47, 31, 33, 47, 35, 37, 47, 38, 39, 47, 32, 33, 47, 36, 37, 47, 41, 42, 47, 34, 35, 47, 36, 37, 47, 44, 45, 4, 40, 43, 46, 8 }

  10. 10

    Returns: {45, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 10, 12, 47, 11, 13, 47, 12, 14, 47, 13, 15, 47, 14, 16, 47, 15, 17, 47, 16, 18, 47, 17, 9, 47, 19, 23, 47, 20, 24, 47, 21, 25, 47, 22, 26, 47, 23, 18, 47, 24, 9, 47, 27, 18, 47, 28, 9, 49, 33, 34, 49, 34, 29, 49, 29, 30, 49, 30, 31, 49, 31, 32, 49, 32, 25, 49, 25, 26, 49, 26, 18, 49, 18, 9, 47, 36, 38, 47, 40, 42, 47, 44, 45, 47, 46, 9, 47, 37, 38, 47, 41, 42, 47, 48, 49, 47, 39, 40, 47, 41, 42, 47, 51, 52, 47, 43, 9, 4, 47, 50, 53, 54 }

  11. 11

    Returns: {52, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 11, 13, 47, 12, 14, 47, 13, 15, 47, 14, 16, 47, 15, 17, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 10, 47, 21, 25, 47, 22, 26, 47, 23, 27, 47, 24, 28, 47, 25, 29, 47, 26, 20, 47, 27, 10, 47, 30, 29, 47, 31, 20, 47, 32, 10, 49, 37, 38, 49, 38, 39, 49, 39, 33, 49, 33, 34, 49, 34, 35, 49, 35, 36, 49, 36, 28, 49, 28, 29, 49, 29, 20, 49, 20, 10, 47, 41, 43, 47, 45, 47, 47, 50, 51, 47, 52, 49, 47, 42, 43, 47, 46, 47, 47, 54, 55, 47, 56, 10, 47, 44, 45, 47, 46, 47, 47, 58, 59, 47, 48, 49, 47, 61, 10, 4, 53, 57, 60, 62 }

  12. 12

    Returns: {60, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 12, 14, 47, 13, 15, 47, 14, 16, 47, 15, 17, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 11, 47, 23, 27, 47, 24, 28, 47, 25, 29, 47, 26, 30, 47, 27, 31, 47, 28, 32, 47, 29, 22, 47, 30, 11, 47, 33, 31, 47, 34, 32, 47, 35, 22, 47, 36, 11, 49, 41, 42, 49, 42, 43, 49, 43, 44, 49, 44, 37, 49, 37, 38, 49, 38, 39, 49, 39, 40, 49, 40, 31, 49, 31, 32, 49, 32, 22, 49, 22, 11, 47, 46, 48, 47, 50, 52, 47, 54, 11, 47, 56, 57, 47, 59, 58, 47, 47, 48, 47, 51, 52, 47, 55, 11, 47, 61, 62, 47, 64, 63, 47, 49, 50, 47, 51, 52, 47, 66, 67, 47, 53, 54, 47, 55, 11, 47, 69, 70, 4, 60, 65, 68, 71 }

  13. 13

    Returns: {67, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 13, 15, 47, 14, 16, 47, 15, 17, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 12, 47, 25, 29, 47, 26, 30, 47, 27, 31, 47, 28, 32, 47, 29, 33, 47, 30, 34, 47, 31, 35, 47, 32, 24, 47, 33, 12, 47, 36, 44, 47, 37, 34, 47, 38, 35, 47, 39, 24, 47, 40, 12, 49, 45, 46, 49, 46, 47, 49, 47, 48, 49, 48, 49, 49, 49, 41, 49, 41, 42, 49, 42, 43, 49, 43, 44, 49, 44, 34, 49, 34, 35, 49, 35, 24, 49, 24, 12, 47, 51, 53, 47, 55, 57, 47, 59, 61, 47, 62, 63, 47, 65, 64, 47, 52, 53, 47, 56, 57, 47, 60, 61, 47, 67, 68, 47, 70, 69, 47, 54, 55, 47, 56, 57, 47, 72, 73, 47, 74, 12, 47, 58, 59, 47, 60, 61, 47, 76, 77, 47, 78, 12, 4, 66, 71, 75, 79 }

  14. 14

    Returns: {75, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 14, 16, 47, 15, 17, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 13, 47, 27, 31, 47, 28, 32, 47, 29, 33, 47, 30, 34, 47, 31, 35, 47, 32, 36, 47, 33, 37, 47, 34, 38, 47, 35, 26, 47, 36, 13, 47, 39, 47, 47, 40, 48, 47, 41, 37, 47, 42, 38, 47, 43, 26, 47, 44, 13, 49, 49, 50, 49, 50, 51, 49, 51, 52, 49, 52, 53, 49, 53, 54, 49, 54, 45, 49, 45, 46, 49, 46, 47, 49, 47, 48, 49, 48, 37, 49, 37, 38, 49, 38, 26, 49, 26, 13, 47, 56, 58, 47, 60, 62, 47, 64, 66, 47, 68, 69, 47, 70, 13, 47, 71, 72, 47, 57, 58, 47, 61, 62, 47, 65, 66, 47, 74, 75, 47, 77, 76, 47, 59, 60, 47, 61, 62, 47, 67, 13, 47, 79, 80, 47, 82, 81, 47, 63, 64, 47, 65, 66, 47, 67, 13, 47, 84, 85, 47, 87, 86, 4, 73, 78, 83, 88 }

  15. 15

    Returns: {83, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 13, 14, 47, 15, 17, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 27, 47, 26, 28, 47, 27, 14, 47, 29, 33, 47, 30, 34, 47, 31, 35, 47, 32, 36, 47, 33, 37, 47, 34, 38, 47, 35, 39, 47, 36, 40, 47, 37, 41, 47, 38, 28, 47, 39, 14, 47, 42, 50, 47, 43, 51, 47, 44, 52, 47, 45, 40, 47, 46, 41, 47, 47, 28, 47, 48, 14, 49, 53, 54, 49, 54, 55, 49, 55, 56, 49, 56, 57, 49, 57, 58, 49, 58, 59, 49, 59, 49, 49, 49, 50, 49, 50, 51, 49, 51, 52, 49, 52, 40, 49, 40, 41, 49, 41, 28, 49, 28, 14, 47, 61, 63, 47, 65, 67, 47, 69, 71, 47, 74, 75, 47, 76, 73, 47, 77, 78, 47, 62, 63, 47, 66, 67, 47, 70, 71, 47, 80, 81, 47, 82, 14, 47, 83, 84, 47, 64, 65, 47, 66, 67, 47, 72, 73, 47, 86, 87, 47, 88, 14, 47, 89, 90, 47, 68, 69, 47, 70, 71, 47, 72, 73, 47, 92, 93, 47, 94, 14, 47, 95, 96, 4, 79, 85, 91, 97 }

  16. 16

    Returns: {92, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 13, 14, 47, 14, 15, 47, 16, 18, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 27, 47, 26, 28, 47, 27, 29, 47, 28, 30, 47, 29, 15, 47, 31, 35, 47, 32, 36, 47, 33, 37, 47, 34, 38, 47, 35, 39, 47, 36, 40, 47, 37, 41, 47, 38, 42, 47, 39, 43, 47, 40, 44, 47, 41, 30, 47, 42, 15, 47, 45, 53, 47, 46, 54, 47, 47, 55, 47, 48, 56, 47, 49, 43, 47, 50, 44, 47, 51, 30, 47, 52, 15, 49, 57, 58, 49, 58, 59, 49, 59, 60, 49, 60, 61, 49, 61, 62, 49, 62, 63, 49, 63, 64, 49, 64, 53, 49, 53, 54, 49, 54, 55, 49, 55, 56, 49, 56, 43, 49, 43, 44, 49, 44, 30, 49, 30, 15, 47, 66, 68, 47, 70, 72, 47, 74, 76, 47, 78, 15, 47, 80, 81, 47, 82, 83, 47, 84, 85, 47, 67, 68, 47, 71, 72, 47, 75, 76, 47, 79, 15, 47, 87, 88, 47, 89, 90, 47, 91, 92, 47, 69, 70, 47, 71, 72, 47, 77, 78, 47, 79, 15, 47, 94, 95, 47, 96, 97, 47, 98, 99, 47, 73, 74, 47, 75, 76, 47, 77, 78, 47, 79, 15, 47, 101, 102, 47, 103, 104, 47, 105, 106, 4, 86, 93, 100, 107 }

  17. 17

    Returns: {98, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 13, 14, 47, 14, 15, 47, 15, 16, 47, 17, 19, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 27, 47, 26, 28, 47, 27, 29, 47, 28, 30, 47, 29, 31, 47, 30, 32, 47, 31, 16, 47, 33, 37, 47, 34, 38, 47, 35, 39, 47, 36, 40, 47, 37, 41, 47, 38, 42, 47, 39, 43, 47, 40, 44, 47, 41, 45, 47, 42, 46, 47, 43, 47, 47, 44, 32, 47, 45, 16, 47, 48, 56, 47, 49, 57, 47, 50, 58, 47, 51, 59, 47, 52, 60, 47, 53, 46, 47, 54, 47, 47, 55, 32, 47, 56, 16, 47, 61, 16, 49, 70, 62, 49, 62, 63, 49, 63, 64, 49, 64, 65, 49, 65, 66, 49, 66, 67, 49, 67, 68, 49, 68, 69, 49, 69, 57, 49, 57, 58, 49, 58, 59, 49, 59, 60, 49, 60, 46, 49, 46, 47, 49, 47, 32, 49, 32, 16, 47, 72, 74, 47, 76, 78, 47, 80, 82, 47, 84, 86, 47, 87, 88, 47, 89, 90, 47, 91, 92, 47, 73, 74, 47, 77, 78, 47, 81, 82, 47, 85, 86, 47, 94, 95, 47, 96, 97, 47, 98, 99, 47, 75, 76, 47, 77, 78, 47, 83, 84, 47, 85, 86, 47, 101, 102, 47, 103, 104, 47, 105, 106, 47, 79, 80, 47, 81, 82, 47, 83, 84, 47, 85, 86, 47, 108, 109, 47, 110, 111, 47, 112, 113, 5, 93, 100, 107, 114, 16 }

  18. 18

    Returns: {106, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 13, 14, 47, 14, 15, 47, 15, 16, 47, 16, 17, 47, 18, 20, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 27, 47, 26, 28, 47, 27, 29, 47, 28, 30, 47, 29, 31, 47, 30, 32, 47, 31, 33, 47, 32, 34, 47, 33, 17, 47, 35, 39, 47, 36, 40, 47, 37, 41, 47, 38, 42, 47, 39, 43, 47, 40, 44, 47, 41, 45, 47, 42, 46, 47, 43, 47, 47, 44, 48, 47, 45, 49, 47, 46, 50, 47, 47, 34, 47, 48, 17, 47, 51, 59, 47, 52, 60, 47, 53, 61, 47, 54, 62, 47, 55, 63, 47, 56, 64, 47, 57, 49, 47, 58, 50, 47, 59, 34, 47, 60, 17, 47, 65, 34, 47, 66, 17, 49, 75, 76, 49, 76, 67, 49, 67, 68, 49, 68, 69, 49, 69, 70, 49, 70, 71, 49, 71, 72, 49, 72, 73, 49, 73, 74, 49, 74, 61, 49, 61, 62, 49, 62, 63, 49, 63, 64, 49, 64, 49, 49, 49, 50, 49, 50, 34, 49, 34, 17, 47, 78, 80, 47, 82, 84, 47, 86, 88, 47, 90, 92, 47, 94, 95, 47, 96, 97, 47, 98, 99, 47, 100, 17, 47, 79, 80, 47, 83, 84, 47, 87, 88, 47, 91, 92, 47, 102, 103, 47, 104, 105, 47, 106, 107, 47, 81, 82, 47, 83, 84, 47, 89, 90, 47, 91, 92, 47, 109, 110, 47, 111, 112, 47, 113, 114, 47, 85, 86, 47, 87, 88, 47, 89, 90, 47, 91, 92, 47, 116, 117, 47, 118, 119, 47, 120, 121, 47, 93, 17, 5, 101, 108, 115, 122, 123 }

  19. 19

    Returns: {114, 47, 0, 1, 47, 1, 2, 47, 2, 3, 47, 3, 4, 47, 4, 5, 47, 5, 6, 47, 6, 7, 47, 7, 8, 47, 8, 9, 47, 9, 10, 47, 10, 11, 47, 11, 12, 47, 12, 13, 47, 13, 14, 47, 14, 15, 47, 15, 16, 47, 16, 17, 47, 17, 18, 47, 19, 21, 47, 20, 22, 47, 21, 23, 47, 22, 24, 47, 23, 25, 47, 24, 26, 47, 25, 27, 47, 26, 28, 47, 27, 29, 47, 28, 30, 47, 29, 31, 47, 30, 32, 47, 31, 33, 47, 32, 34, 47, 33, 35, 47, 34, 36, 47, 35, 18, 47, 37, 41, 47, 38, 42, 47, 39, 43, 47, 40, 44, 47, 41, 45, 47, 42, 46, 47, 43, 47, 47, 44, 48, 47, 45, 49, 47, 46, 50, 47, 47, 51, 47, 48, 52, 47, 49, 53, 47, 50, 36, 47, 51, 18, 47, 54, 62, 47, 55, 63, 47, 56, 64, 47, 57, 65, 47, 58, 66, 47, 59, 67, 47, 60, 68, 47, 61, 52, 47, 62, 53, 47, 63, 36, 47, 64, 18, 47, 69, 53, 47, 70, 36, 47, 71, 18, 49, 80, 81, 49, 81, 82, 49, 82, 72, 49, 72, 73, 49, 73, 74, 49, 74, 75, 49, 75, 76, 49, 76, 77, 49, 77, 78, 49, 78, 79, 49, 79, 65, 49, 65, 66, 49, 66, 67, 49, 67, 68, 49, 68, 52, 49, 52, 53, 49, 53, 36, 49, 36, 18, 47, 84, 86, 47, 88, 90, 47, 92, 94, 47, 96, 98, 47, 101, 102, 47, 103, 104, 47, 105, 106, 47, 107, 100, 47, 85, 86, 47, 89, 90, 47, 93, 94, 47, 97, 98, 47, 109, 110, 47, 111, 112, 47, 113, 114, 47, 115, 18, 47, 87, 88, 47, 89, 90, 47, 95, 96, 47, 97, 98, 47, 117, 118, 47, 119, 120, 47, 121, 122, 47, 91, 92, 47, 93, 94, 47, 95, 96, 47, 97, 98, 47, 124, 125, 47, 126, 127, 47, 128, 129, 47, 99, 100, 47, 131, 18, 5, 108, 116, 123, 130, 132 }


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: