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 07:25NoSIMD_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 06:5400000Error: expected "2202435359 ", got "2190433313 "
2Apr 9, 2025 06:5500000Error: expected "2248081665 ", got "2190433319 "
3Apr 9, 2025 07:19228,5561,900,600,7461,736,223,000137,938,0002,338,816
4Apr 9, 2025 07:25229,4301,908,393,8111,749,444,000131,882,0002,322,432
5Apr 9, 2025 07:19271,7182,256,340,3472,106,141,000121,950,0002,326,528
6Apr 9, 2025 07:19273,2062,267,298,8082,117,382,000122,906,0002,322,432
7Apr 9, 2025 07:25309,6792,567,814,8272,420,447,000118,923,0002,539,520
8Apr 9, 2025 07:25319,6932,646,364,5422,494,557,000126,926,0002,437,120