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 listJul 7, 2025 20:47Valentin KofmanValentin KofmanError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:26Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:320172,645,819161,141,0001,018,0002,113,536expected "1119526490 ", got "4782 "
2Oct 5, 2026 21:32084,729,99072,742,0001,024,00016,384No answer to stdout. Died or killed?
3Jul 7, 2025 20:479,357101,331,23174,736,0001,992,0002,334,720
4Jul 7, 2025 20:479,365100,420,69074,802,0001,994,0002,510,848
5Jul 7, 2025 20:479,372100,130,29074,851,0001,996,0002,310,144
6Jul 7, 2025 20:479,37499,403,25674,871,0001,996,0002,322,432
7Jul 7, 2025 20:479,37798,362,15274,898,0001,997,0002,510,848
8Jul 7, 2025 20:479,37998,843,20974,910,0001,997,0002,510,848
9Jul 7, 2025 20:479,38498,441,38975,946,000999,0002,342,912
10Jul 7, 2025 20:479,385100,997,43475,956,000999,0002,506,752
11Jul 7, 2025 20:479,39298,231,33576,013,0001,000,0002,510,848