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 listMay 7, 2024 00:12Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2024 00:1200000Error: No answer to stdout. Died or killed?
2May 7, 2024 00:1248,884461,084,378400,846,17102,220,032
3May 7, 2024 00:1249,265474,880,600403,970,13702,244,608
4May 7, 2024 00:1249,522461,921,770406,084,19002,203,648
5May 7, 2024 00:1350,531475,267,479414,350,18802,195,456
6May 7, 2024 00:1251,436486,870,005421,777,31502,211,840
7May 7, 2024 00:1251,598490,021,376423,100,63902,244,608
8May 7, 2024 00:1351,891480,916,496425,508,71702,228,224
9May 7, 2024 00:1251,925477,874,643425,782,33002,277,376
10May 7, 2024 00:1352,039500,442,433426,718,46402,220,032
11May 7, 2024 00:1252,049492,752,695426,803,16702,314,240
12May 7, 2024 00:1252,147481,469,089427,606,86402,314,240
13May 7, 2024 00:1252,536499,695,201430,794,74202,293,760
14May 7, 2024 00:1254,137521,917,003443,919,75502,236,416
15May 7, 2024 00:1254,607513,997,760447,774,00102,215,936
16May 7, 2024 00:1254,994524,289,978450,951,28402,297,856