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 23, 2024 21:00Andrey LikhachevAndrey LikhachevScore: 5,032Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 23, 2024 21:005,00466,882,80440,030,0001,000,0002,375,680
2Jun 23, 2024 21:005,00566,422,86339,041,0002,002,0002,400,256
3Jun 23, 2024 21:005,01366,000,40439,105,0002,005,0002,338,816
4Jun 23, 2024 21:005,02065,648,87139,157,0002,008,0002,338,816
5Jun 23, 2024 21:005,03165,537,49438,235,0003,018,0002,527,232
6Jun 23, 2024 21:005,03162,115,55539,243,0002,012,0002,355,200
7Jun 23, 2024 21:005,03162,022,09339,244,0002,012,0002,359,296
8Jun 23, 2024 21:005,03272,430,56640,259,0001,006,0002,416,640
9Jun 23, 2024 21:005,04667,652,68340,367,0001,009,0002,318,336
10Jun 23, 2024 21:345,191109,595,49042,567,10302,211,840
11Jun 23, 2024 21:005,222119,320,21642,817,19202,256,896
12Jun 23, 2024 21:005,245107,921,39643,007,58202,277,376
13Jun 23, 2024 21:005,251126,604,29243,057,37402,191,360
14Jun 23, 2024 21:345,252121,438,80143,069,43802,301,952
15Jun 23, 2024 21:345,265119,018,08543,168,98702,252,800