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 6, 2025 21:02Valentin KofmanValentin KofmanScore: 15,449Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 6, 2025 21:0215,055153,580,109122,446,0001,003,0002,351,104
2Jul 6, 2025 21:0215,281150,843,179124,301,0001,002,0002,277,376
3Jul 6, 2025 21:0215,326148,673,750124,673,000997,0002,359,296
4Jul 6, 2025 21:0215,402148,302,776125,292,0001,002,0002,273,280
5Jul 6, 2025 21:0215,449148,206,313126,679,00002,273,280
6Jul 6, 2025 21:0215,471150,313,272124,864,0001,997,0002,359,296
7Jul 6, 2025 21:0215,686161,908,468127,632,000997,0002,269,184
8Jul 6, 2025 21:0215,759152,069,897129,225,00002,265,088
9Jul 6, 2025 21:0215,811160,927,043127,654,0001,994,0002,265,088