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 listNov 15, 2024 03:30Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 15, 2024 03:2900000Error: expected "2352031053 ", got "0 "stderr
2Nov 15, 2024 03:3000000Error: No answer to stdout. Died or killed?stderr
3Nov 15, 2024 03:318,27289,979,91257,857,0009,975,0002,322,432
4Nov 15, 2024 03:319,260100,378,67467,942,0007,993,0002,371,584
5Nov 15, 2024 03:309,636102,887,03673,013,0006,001,0002,359,296
6Nov 15, 2024 03:309,805102,077,44175,380,0005,025,0002,367,488
7Nov 15, 2024 03:3010,058101,894,77175,435,0007,040,0002,490,368
8Nov 15, 2024 03:3110,465104,249,78878,826,0006,984,0002,400,256