You are given two buckets. These buckets are a bit weird, for the only thing they can hold are numbers. One is empty, but the other one contains numbers $1,1,2$. Your goal is to get the number $2020$ alone in either of these buckets, by constructing it using the following set of rules:
- Each round, you can take exactly $2$ numbers out of one of the buckets. If a bucket contains only 1 number, you can't choose it,
- You perform an arithmetic operation with the selected $2$ numbers in whichever order. Allowed operations are addition, subtraction, multiplication or division,
- You have to put the obtained result into the bucket from which you selected, and the $2$ selected numbers into the other bucket.
Find the shortest way to end up with only the number $2020$ in either of the buckets!
An example of constructing the number $20$ (there probably are shorter solutions):
[2,1,1] []
Round 1:
- Select (1,1) from the first bucket and addition: 1+1=2
- Put 2 in the original bucket and (1,1) in the other one
=> [2,2] [1,1]
And so on.
[4] [2,2,1,1] (2,2 from the 1st bucket and multiplication)
[4,2,2] [4,1,1] (2,2 from the 2nd bucket and multiplication)
[4,2,2,1,1] [4,2] (1,1 from the 2nd bucket and addition)
[5,2,2,1] [4,4,2,1] (4,1 from the 1st bucket and addition)
[5,4,1] [4,4,2,2,2,1] (2,2 from the 1st bucket and multiplication)
[20,1] [5,4,4,4,2,2,2,1] (5,4 from the 1st bucket and multiplication)
[20] [20,5,4,4,4,2,2,2,1,1] (20,1 from the 1st bucket and multiplication)