Carving Tiny Fractions

View as PDF

Submit solution

Points: 25 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

You are walking alone in the woods one night when out of the corner of your eye you see something moving. You turn and see a Large Russian Bear moving towards you.

It turns out this bear is writing a contest problem, and requires a list of Egyptian Fractions (reciprocals of positive integers) whose sum is extremely close to, but not exactly, equal to 1.

Input Format

You are given a single integer v \in \{-1, 1\}

Output Format

On the first line, output a single integer n, 1 \leq n \leq 1000.

On the second line, output n integers, 1 \leq x_i \leq 10^{18}.

Scoring

If your output is improperly formatted you will receive 0 points.

Otherwise, let S = \sum_{i = 1}^n \frac{1}{x_i}. If v = 1 then you must have S > 1 or you will receive 0 points. Similarly, if v = -1 then you must have S < 1 or you will recieve 0 points.

If you have a valid submission, then you receive points according to the following table, where T = -\log_{10}(|1 - S|)

TScore
T < 300
30 \leq T < 503(T - 30)
50 \leq T < 10060 + \frac{2(T - 50)}{5}
100 \leq T < 50080 + \frac{T - 100}{20}
T \geq 500100

Comments

There are no comments at the moment.