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 3, 2026 01:37Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2026 01:37085,981,00676,927,000020,480expected "2138030277 ", got "M 1 3847 269 926272 18 5 1456 49994697 49994697 1456 "
2Oct 3, 2026 01:372,47231,050,56520,274,000020,480
3Oct 3, 2026 01:372,48329,389,24020,362,000020,480
4Oct 3, 2026 01:372,48329,398,99520,362,000020,480
5Oct 3, 2026 01:372,48429,447,78220,369,000020,480
6Oct 3, 2026 01:372,48529,487,71920,377,000020,480
7Oct 3, 2026 01:372,48829,509,78520,404,000020,480
8Oct 3, 2026 01:372,49129,433,80220,427,000020,480
9Oct 3, 2026 01:372,49229,460,49920,437,000020,480