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 22, 2024 23:04Andrey LikhachevAndrey LikhachevScore: 39,746Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 22, 2024 23:0533,036330,128,046270,897,27102,224,128
2Jun 22, 2024 23:1637,762372,794,655309,645,38402,220,032
3Jun 22, 2024 23:0537,772374,164,859309,734,45402,220,032
4Jun 22, 2024 23:0538,891401,884,681318,904,97702,215,936
5Jun 22, 2024 23:0439,746392,553,385325,918,65902,220,032
6Jun 22, 2024 23:1640,711389,100,321333,828,57202,228,224
7Jun 22, 2024 23:0440,763405,908,603334,258,20302,211,840
8Jun 22, 2024 23:0442,371405,641,933347,442,05202,347,008
9Jun 22, 2024 23:1642,539419,629,586348,818,65702,224,128