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

Обсуждение задачи 1306. Медиана последовательности

TEST #5 IS WRONG!
Послано Alexander Prudaev 7 мар 2006 19:41
I use n/2 array and i insure that my program right,
but i got WA5.

please insure that's rigth test or give me it.

anybody knows where i can got test?
Re: TEST #5 IS WRONG!
Послано Peter Petrov (Sedefcho) 14 июл 2006 16:24
I also have problems with test #5. Can someone post
some test cases?
I use unsigned long datatype which enough for
numbers ranging from 0 to 2^32-1, right?
I also use heap and the program does not get Memory
Limit Exceeded. Unfortunaly I get WA on test#5 and
I don't know the reason yet. Does anyone have some nice
tests for this problem?

Thanks in advance.

Peter
Re: TEST #5 IS WRONG!
Послано Dottik 30 авг 2006 20:58
I hope it will help you:

3
4294967295
4294967295
4294967295

and

4
4294967295
4294967295
4294967295
4294967295


PS
4294967295 = 2^32-1

lots of programs get WA cause overflow (-1.0), but correct answer for test #1 is 4294967295.0
Good luck!

Edited by author 30.08.2006 21:02
Re: TEST #5 IS WRONG!
Послано metar 31 янв 2010 15:50
Thanks, it helped much!
Re: TEST #5 IS WRONG!
Послано Name must be given in English 14 май 2010 13:34
2^31-1 = 2'147'483'647
(2^31-1) * 2 = 4'294'967'294

overflow is when you do this:

[(2^31-1) + (2^31-1)] / 2 = (4'294'967'294) / 2 = 2^31-1
Re: TEST #5 IS WRONG!
Послано dingo 17 июл 2011 17:52
My program successfully passes these tests but still has WA#5 :(
Re: TEST #5 IS WRONG!
Послано Macarie 18 июл 2011 16:05
try this test:

66
1822588296
1499349644
1998339909
438738270
168078851
1372627910
950185897
1382051023
963930101
1831994657
1871239379
1044037823
1835050606
960512955
708338089
2003230326
1035076748
89016539
858957869
1853110619
895749309
148663460
1137471506
603327469
659851397
1213636411
1075864991
970750774
1582471369
2081718373
1883405666
1093053606
1015209628
2107379130
1789966364
1740289668
501120122
2134118210
604918626
1788007116
303708185
294840996
1477373566
1880931488
1101825197
1005585635
1068936228
786341935
305053122
709515845
1220466783
72910094
1574722146
903771479
1113070349
1613404991
1384276211
1274833854
857128720
662590071
1266344829
1996098077
1277433268
1956553751
991087736
227071513
Re: TEST #5 IS WRONG!
Послано Zhang Ye 13 окт 2011 17:09
Dear Macarie
I got WA#5 too,
Can you tell me your method to this question, please.
Re: TEST #5 IS WRONG!
Послано hello_world_ww 23 ноя 2012 16:52
thank you!I overlooked this point ……
Re: TEST #5 IS WRONG!
Послано KVN-Khai>>Ann 14 окт 2013 21:02
thank you)