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 listApr 9, 2025 05:33NoSIMD_C#NoSIMD_C#Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2025 05:3100000Error: expected "2222702574 ", got "2190433276 "
2Apr 9, 2025 05:3200000Error: expected "2249034528 ", got "2190433226 "
3Apr 9, 2025 05:33165,4341,383,182,1331,239,598,000116,962,0002,326,528
4Apr 9, 2025 05:33186,3201,564,494,5161,422,904,000104,919,0002,408,448
5Apr 9, 2025 05:33319,0602,644,767,6112,490,375,000125,917,0002,330,624