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 13, 2021 05:21Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 10:15Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 10:15074,578,28344,277,00019,437,00016,384No answer to stdout. Died or killed?
2Sep 9, 2026 10:157,92475,791,28344,091,00020,891,00020,480
3Jun 13, 2021 05:218,186101,589,28150,095,00017,032,0002,490,368
4Jun 13, 2021 05:218,22492,334,46851,333,00016,104,0002,478,080
5Jun 13, 2021 05:218,24897,637,64749,462,00018,169,0002,510,848
6Jun 13, 2021 05:218,26494,032,46849,827,00017,937,0002,490,368
7Jun 13, 2021 05:218,27897,765,79547,918,00019,965,0002,338,816
8Jun 13, 2021 05:218,29692,838,78950,021,00018,007,0002,523,136
9Jun 13, 2021 05:218,41496,468,57050,999,00017,999,0002,498,560
10Jun 13, 2021 05:218,45494,855,30854,250,00015,069,0002,486,272
11Jun 13, 2021 05:218,479130,857,55869,531,70302,277,376
12Jun 13, 2021 05:218,549128,517,51970,102,99102,228,224
13Jun 13, 2021 05:218,645139,125,07470,885,71702,236,416
14Jun 13, 2021 05:219,18297,861,20857,220,00018,069,0002,342,912