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 13, 2023 14:47Paul MasurelPaul MasurelScore: 6,317Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2023 14:465,78372,757,84541,370,0006,054,0002,428,928
2Jul 13, 2023 14:465,95474,624,83745,834,0002,989,0002,306,048
3Jul 13, 2023 14:465,95979,002,30143,877,0004,986,0002,396,160
4Jul 13, 2023 14:475,969118,912,24548,943,22202,293,760
5Jul 13, 2023 14:465,97676,438,03844,004,0005,000,0002,301,952
6Jul 13, 2023 14:485,99778,691,90545,161,0004,014,0002,465,792
7Jul 13, 2023 14:466,02679,945,13244,369,0005,041,0002,502,656
8Jul 13, 2023 14:486,09578,238,66243,979,0005,997,0002,473,984
9Jul 13, 2023 14:466,11478,278,47142,115,0008,021,0002,428,928
10Jul 13, 2023 14:486,12076,690,74545,164,0005,018,0002,412,544
11Jul 13, 2023 14:486,173122,313,27350,619,30002,318,336
12Jul 13, 2023 14:486,200119,765,81650,843,07902,248,704
13Jul 13, 2023 14:466,228115,034,63651,072,46102,289,664
14Jul 13, 2023 14:486,31779,604,59246,821,0004,981,0002,297,856
15Jul 13, 2023 14:486,330123,744,34751,901,98702,306,048
16Jul 13, 2023 14:466,390110,174,19952,401,68202,199,552
17Jul 13, 2023 14:466,504118,487,51153,334,57602,187,264
18Jul 13, 2023 14:486,84779,778,12151,135,0005,013,0002,281,472
19Jul 13, 2023 14:4820,624193,618,887165,111,0004,002,0002,342,912
20Jul 13, 2023 14:4620,687194,236,741164,647,0004,989,0002,437,120
21Jul 13, 2023 14:4820,689198,441,355163,661,0005,987,0002,420,736
22Jul 13, 2023 14:4620,695195,421,003163,709,0005,989,0002,351,104
23Jul 13, 2023 14:4620,733193,603,281165,013,0005,000,0002,453,504
24Jul 13, 2023 14:4820,755195,902,692165,190,0005,005,0002,478,080
25Jul 13, 2023 14:4820,802196,437,048166,589,0003,990,0002,527,232
26Jul 13, 2023 14:4720,861241,780,794171,059,17902,281,472
27Jul 13, 2023 14:4721,168245,530,547173,581,23302,285,568