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 listJul 15, 2023 14:22Paul MasurelPaul MasurelScore: 50,111Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 14:214,240101,779,52134,767,82402,314,240
2Jul 15, 2023 14:254,294100,222,04335,211,43902,293,760
3Jul 15, 2023 14:234,458103,892,00336,557,38302,314,240
4Jul 15, 2023 14:2149,996492,046,242409,963,20702,281,472
5Jul 15, 2023 14:2250,009477,793,174410,071,79102,281,472
6Jul 15, 2023 14:2250,052471,141,239410,428,15402,207,744
7Jul 15, 2023 14:2350,067470,226,601410,550,11602,224,128
8Jul 15, 2023 14:2350,083480,370,040410,679,65702,310,144
9Jul 15, 2023 14:2650,098468,318,154410,807,63302,211,840
10Jul 15, 2023 14:2250,102488,696,173410,834,82002,273,280
11Jul 15, 2023 14:2550,111484,637,282410,908,64402,215,936
12Jul 15, 2023 14:2350,148478,427,647411,211,91602,281,472
13Jul 15, 2023 14:2250,159481,058,278411,301,70802,301,952
14Jul 15, 2023 14:2650,160482,614,978411,308,19702,244,608
15Jul 15, 2023 14:2550,175479,644,594411,431,33602,211,840
16Jul 15, 2023 14:2150,176489,192,468411,443,76002,187,264
17Jul 15, 2023 14:2650,192487,257,807411,570,75402,252,800
18Jul 15, 2023 14:2350,201488,469,178411,645,00002,203,648
19Jul 15, 2023 14:2250,202481,952,171411,654,06902,281,472
20Jul 15, 2023 14:2350,210476,767,271411,722,61302,220,032
21Jul 15, 2023 14:2250,234484,705,606411,915,25002,265,088