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 19, 2024 18:42zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:28Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:2808,797,0011,047,000020,480No answer to stdout. Died or killed?
2Oct 19, 2024 18:423,16446,534,28324,947,000997,0002,514,944
3Oct 19, 2024 18:423,17148,528,36625,004,0001,000,0002,355,200
4Oct 19, 2024 18:423,18052,574,97925,075,0001,003,0002,482,176
5Oct 19, 2024 18:423,18745,849,15823,118,0003,015,0002,351,104
6Oct 19, 2024 18:423,18855,043,63324,129,0002,010,0002,285,568
7Oct 19, 2024 18:423,19046,366,82725,154,0001,006,0002,527,232
8Oct 19, 2024 18:423,19455,930,21224,177,0002,014,0002,527,232
9Oct 19, 2024 18:423,19548,761,49025,193,0001,007,0002,342,912
10Oct 19, 2024 18:423,19852,819,66224,207,0002,017,0002,359,296