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 listAug 2, 2022 23:03Robert BurkeRobert BurkeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 2, 2022 23:0300000Error: expected "2281015866 ", got "2080503508 "stderr
2Aug 2, 2022 23:0400000Error: No answer to stdout. Died or killed?stderr
3Aug 3, 2022 09:074,74995,343,54738,937,96902,269,184
4Aug 2, 2022 23:044,775118,329,36339,151,03402,179,072
5Aug 3, 2022 09:074,78495,408,75739,228,43002,269,184
6Aug 2, 2022 23:054,865104,892,24539,897,06802,199,552
7Aug 2, 2022 23:054,902100,750,56640,200,39002,228,224
8Aug 2, 2022 23:044,928102,395,08540,410,93202,293,760
9Aug 3, 2022 09:074,98994,451,58240,905,77202,265,088
10Aug 2, 2022 23:055,053100,996,02641,432,38502,289,664
11Aug 2, 2022 23:045,093100,409,55741,759,56402,199,552