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 24, 2024 16:02Andrey LikhachevAndrey LikhachevScore: 3,739Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 24, 2024 16:023,68854,650,59228,229,0002,016,0002,371,584
2Jun 24, 2024 16:023,69855,544,56328,300,0002,021,0002,478,080
3Jun 24, 2024 16:023,69853,891,65829,314,0001,010,0002,412,544
4Jun 24, 2024 16:023,72255,068,56229,501,0001,017,0002,363,392
5Jun 24, 2024 16:023,72554,128,91729,525,0001,018,0002,355,200
6Jun 24, 2024 16:023,73655,911,95629,614,0001,021,0002,326,528
7Jun 24, 2024 16:023,73957,772,69429,640,0001,022,0002,338,816
8Jun 24, 2024 16:023,76259,184,81929,850,000995,0002,322,432
9Jun 24, 2024 16:023,76459,606,11930,866,00002,465,792
10Jun 24, 2024 16:023,87593,977,67231,776,97902,269,184
11Jun 24, 2024 16:023,926109,600,09432,196,44602,215,936
12Jun 24, 2024 16:023,94193,225,26032,314,89002,306,048