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 8, 2024 07:35Matt 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 8, 2024 07:3300000Error: Exit with code 1: Index out of bounds: 2939632 Filtered size: 1306997stderr
2Nov 8, 2024 07:3400000Error: Exit with code 1: Index out of bounds: 4294064293 Filtered size: 4791766stderr
3Nov 8, 2024 07:3400000Error: Exit with code 1: Index out of bounds: 4294627309 Filtered size: 6219013stderr
4Nov 8, 2024 07:3500000Error: Exit with code 1: Index out of bounds: 6488150 Filtered size: 4533902stderr
5Nov 8, 2024 07:3580,828687,746,403654,795,0007,997,0002,351,104
6Nov 8, 2024 07:3583,238713,166,335673,560,0008,994,0002,416,640
7Nov 8, 2024 07:3586,919742,419,896697,745,00014,994,0002,424,832