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

Обсуждение задачи 1428. Джедайский ребус

Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Vladimir Yakovlev (USU) 9 янв 2007 16:44
New tests were added. 77 authors lost AC.
Cool! We failed to foresee such kind of tests. Thanks to Vladimir Yakovlev (-)
Послано Dmitry 'Diman_YES' Kovalioff 9 янв 2007 22:07
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано SPIRiT 12 янв 2007 17:35
Don't know what kind of tests were added, but all I had to do is to change type of X,Y from int to __int64 in order to get AC again
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Roma Labish[Lviv NU] 12 янв 2007 17:56
Only worse case is
1 1 32 -> And answer must be 2^32 > max_int
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Burunduk1 13 янв 2007 12:04
My solution (and, as far as I know, author's one also) produces answers <= 2^31.
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Roma Labish[Lviv NU] 14 янв 2007 00:12
When my soulution produced <= 2^31 I had Wa52. But when I changed it to <= 2^32 -> AC
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Burunduk1 14 янв 2007 04:32
I think we speak about different things...
You speak about type, in which result is stored.
And I say that there is correct formula, which produces results <= 2^31.
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано KIRILL(ArcSTU) 14 янв 2007 13:49
May be 2<<31 ?
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано Burunduk1 14 янв 2007 14:53
Yes. If you are used to C style.
^ is usual designation for power.
Re: Problem 1428 "Jedi riddle" has been rejudged (+)
Послано KIRILL(ArcSTU) 14 янв 2007 19:01
yes I know
(long long)2<<31 = int64(2 shl 31) = 2^32
it's max answer of my formula for
test 1 1 32 which was added just 1 week ago