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:26zielajzielajScore: 3,571Success
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:263,55951,927,30227,170,0002,012,0002,306,048
2Oct 16, 2024 01:263,56048,583,31126,173,0003,020,0002,494,464
3Oct 16, 2024 01:263,56753,915,60927,236,0002,017,0002,318,336
4Oct 16, 2024 01:263,57050,782,17528,267,0001,009,0002,531,328
5Oct 16, 2024 01:263,57152,618,84527,264,0002,019,0002,416,640
6Oct 16, 2024 01:263,57251,182,65727,271,0002,020,0002,342,912
7Oct 16, 2024 01:263,57956,441,81226,309,0003,035,0002,457,600
8Oct 16, 2024 01:263,58755,958,75425,492,0003,921,0002,482,176
9Oct 16, 2024 01:263,59048,931,34026,396,0003,045,0002,408,448