Is the answer for this problem always "YES"?

Правка en1, от MohamedMagdy, 2022-03-26 22:57:05

I randomly came up with this problem and tried to solve it, but unfortunately, I couldn't.

The problem is:

Given an array of length $$$n \geq 2 $$$ of positive integers, is it possible to make all elements equal doing the following operation any number of times (possibly zero)? In one operation we can pick any two different indices $$$i, j$$$ multiply $$$a_i$$$ by $$$2$$$, and add $$$1$$$ to $$$a_j$$$.

I've tried to bruteforce arrays of length $$$2$$$ up to $$$20$$$. $$$[1, 2]$$$, $$$[1, 3]$$$, $$$[1, 4]$$$, $$$\dots$$$ $$$[19, 20]$$$, and it is possible to make all elements equal. The question is: Is the answer for this problem always "YES" for any $$$n \geq 2$$$?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MohamedMagdy 2022-03-26 22:57:05 677 Initial revision (published)