Median Sergey Svistunov

Find the median of a stream of binary integers as fast as possible.

Input: 100 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The median value, printed as a decimal string. The median is defined as the element at index N/2 (i.e., a[50000000]) in the sorted array.

Back to listJun 20, 2021 22:41Andrey TsvetkovAndrey TsvetkovScore: 103,925Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 20, 2021 22:4182,780753,203,578678,800,04602,301,952
2Jun 20, 2021 22:4084,617789,465,474693,863,02702,265,088
3Jun 20, 2021 22:4084,715760,767,818694,659,70602,293,760
4Jun 20, 2021 22:4085,452755,657,920700,703,88702,310,144
5Jun 20, 2021 22:4086,027771,610,733705,424,22102,293,760
6Jun 20, 2021 22:4086,202790,114,083706,856,17002,301,952
7Jun 20, 2021 22:4190,057798,916,576738,469,49902,306,048
8Jun 20, 2021 22:4191,162804,300,543747,531,66002,228,224
9Jun 20, 2021 22:4091,412820,639,889749,576,36102,297,856
10Jun 20, 2021 22:4492,295817,012,443756,820,74602,289,664
11Jun 20, 2021 22:4094,606834,520,947775,770,69202,297,856
12Jun 20, 2021 22:4094,732830,935,830776,801,70102,281,472
13Jun 20, 2021 22:4095,828845,184,453785,786,66302,310,144
14Jun 20, 2021 22:4197,448866,002,779799,075,38402,297,856
15Jun 20, 2021 22:4499,047866,696,309812,183,04002,301,952
16Jun 20, 2021 22:4199,190870,100,208813,361,57902,301,952
17Jun 20, 2021 22:41101,514910,896,057832,416,63402,306,048
18Jun 20, 2021 22:40102,390916,532,007839,597,86602,301,952
19Jun 20, 2021 22:44103,925908,763,577852,188,11602,301,952
20Jun 20, 2021 22:41104,077909,465,535853,431,44402,306,048
21Jun 20, 2021 22:41104,342921,854,461855,606,53402,289,664
22Jun 20, 2021 22:40105,244922,779,437863,000,48002,289,664
23Jun 20, 2021 22:41105,736924,059,875867,034,51902,301,952
24Jun 20, 2021 22:40107,469941,020,458881,244,88902,289,664
25Jun 20, 2021 22:40107,572943,277,622882,088,41602,297,856
26Jun 20, 2021 22:41108,399963,302,060888,869,46102,285,568
27Jun 20, 2021 22:40109,327953,145,532896,484,91702,289,664
28Jun 20, 2021 22:41109,786969,997,690900,248,52202,297,856
29Jun 20, 2021 22:40111,668982,799,904915,673,92902,285,568
30Jun 20, 2021 22:40115,2591,003,782,895945,125,66802,306,048
31Jun 20, 2021 22:41117,4891,017,684,298963,408,56202,297,856
32Jun 20, 2021 22:41118,3461,024,779,305970,437,28602,289,664
33Jun 20, 2021 22:40118,5471,041,997,171972,083,91202,301,952
34Jun 20, 2021 22:40119,0571,037,139,935976,271,15802,285,568
35Jun 20, 2021 22:41120,7581,058,143,049990,212,81202,306,048
36Jun 20, 2021 22:41124,4551,088,309,4501,020,532,92102,269,184