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 19, 2021 10:37Dmitry DolgopolovDmitry DolgopolovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2021 10:3700000Error: died or killedstderr
2Jun 19, 2021 10:37263,4642,209,879,5622,160,407,64002,293,760
3Jun 19, 2021 10:37298,8622,514,459,2052,450,668,45702,174,976
4Jun 19, 2021 10:37495,6134,119,187,1244,064,023,73902,289,664
5Jun 19, 2021 10:37520,3794,322,815,7374,267,109,78902,215,936
6Jun 19, 2021 10:371,079,1658,905,088,1218,849,152,37202,297,856
7Jun 19, 2021 10:371,673,96713,791,501,13413,726,533,32802,297,856