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

Обсуждение задачи 1502. Точки домино

Test
Послано Zeva [USU] 28 окт 2006 17:07
1000 => 501501000
500  => 62875500
333  => 18629685
1    => 3
3    => 30
4    => 60
But Wa#5

Edited by author 28.10.2006 17:09
Re: Test
Послано ФерПИ_2 28 окт 2006 17:21
The same with me: WA#5 can anybody tell me why
Re: Test
Послано emotional blind 28 окт 2006 17:30
Did you use "long long"
Re: Test
Послано emotional blind 28 окт 2006 17:31
Did you use "long long"?
Re: Test
Послано Madiyar Tursunbayev 29 окт 2006 12:11
Just use int64 instead of longint;
Re: Test
Послано Todor Tsonkov 30 окт 2006 16:02
My solution is very short and I also get WA5, my answers are the same as those posted, can anyone give some hint ?
Re: Test
Послано USTU-FTF KOIBAS Team 30 окт 2006 16:30
I got Accepted using BrutForce!!!
Re: Test
Послано Todor Tsonkov 30 окт 2006 17:02
Already solved this problem, read the hint below :)

Edited by author 30.10.2006 21:20
Re: Test
Послано N.M.Hieu ( DHSP ) 30 окт 2006 18:28
Yes , me , too .
WA#5 but AC now , you should change "int n" into "long long n" .
Re: Test
Послано Todor Tsonkov 30 окт 2006 21:20
Yup, 10x pal, you saved me from reading again and again this task and to wonder where I was wrong :)
WA on 5
Послано Alexander Prokazyuk (TKTL) 2 ноя 2006 07:17
Who can find my mistake?

[code deleted]

it passes all my tests, but it can't pass 5

Edited by moderator 29.12.2006 09:16
Re: WA on 5
Послано Anton [SUrSU] 2 ноя 2006 11:49
This is my formula
  for (int i = 0; i <= n; ++i)
    res += (i + n) * (n - i + 1) / 2 + i * (n - i + 1);
Re: Test
Послано Petromil Petkov 10 ноя 2006 01:00
Thanks for the advice. Could you tell me what brings this change? n=10000 fits in an int, doesn't it?

Ha! Got accepted only with __int64 and not with long long... my djgpp returns a compilation error on such a line... could anybody explain me what should that be?

Edited by author 10.11.2006 01:16
Re: WA on 5
Послано Leonid 30 май 2007 18:01
This one is mine:
n*-~n*-~-~n>>1
Have fun!
Re: WA on 5
Послано Mihran Hovsepyan <<RAU>><<1 kurs>> 8 ноя 2007 16:00
Delete your AC code.
Re: Test
Послано ImranYusubov 29 фев 2008 15:06


Edited by author 02.03.2008 12:53
Re: Test
Послано ImranYusubov 29 фев 2008 15:07


Edited by author 02.03.2008 12:54
Re: Test
Послано foodie 30 июл 2013 17:55
senks bro