ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1222. Chernobyl’ Eagles

bsu.mmf.team Right Algo: [4] // Задача 1222. Chernobyl’ Eagles 24 ноя 2008 22:33
The product of natural numbers with a given condition in this problem will be maximal if and only if the middle arithmetic of these numbers is the most closely to the number e=2.71828... It's a mathematical sentence which are proved!

P.S. Sorry for my bad English
kobra Re: Right Algo: // Задача 1222. Chernobyl’ Eagles 13 мар 2012 20:20
thank you for advice
Petru Trimbitas Re: Right Algo: [2] // Задача 1222. Chernobyl’ Eagles 26 июл 2012 18:41
Why is that true? You can get AC without math :P
2rf Re: Right Algo: [1] // Задача 1222. Chernobyl’ Eagles 27 июл 2012 01:32
Well, you only need to understand that optimal partition can't contain any x >= 4(as 2*(x-2) >= x in this case), it obviously can't contain ones, and it can't contain more than 2 copies of 2, as 2*2*2<3*3. Surpisingly, there is only one way to express any x >= 2 as sum of 3's and not more than two 2's.
ComebackSeason Re: Right Algo: // Задача 1222. Chernobyl’ Eagles 16 июн 2017 22:11
That's a very nice idea. Let me clarify it for those who had problems understanding  bsu.mmf.team's English. First of all, 'middle arithmetic' is an arithmetic mean. The thing is, the product will be maximal if (a_1 + a_2 + ... + a_n) / n  ≈ e.
Well, it's not hard to figure out that the output of the program should be something like that:    3 * 3 * 3 * ... * ?