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 listOct 16, 2024 01:39zielajzielajScore: 3,454Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 16, 2024 01:393,44253,086,87126,212,0002,016,0002,314,240
2Oct 16, 2024 01:393,44354,311,32626,218,0002,016,0002,412,544
3Oct 16, 2024 01:393,44454,839,38026,224,0002,017,0002,334,720
4Oct 16, 2024 01:393,44649,992,79627,245,0001,009,0002,433,024
5Oct 16, 2024 01:393,45448,790,69725,288,0003,034,0002,306,048
6Oct 16, 2024 01:393,45650,447,19827,327,0001,012,0002,375,680
7Oct 16, 2024 01:393,45854,509,39726,328,0002,025,0002,310,144
8Oct 16, 2024 01:393,47145,447,65827,444,0001,016,0002,379,776
9Oct 16, 2024 01:393,47847,833,64927,504,0001,018,0002,437,120