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 15, 2023 14:32Paul MasurelPaul MasurelScore: 58,089Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 14:324,22363,853,42133,608,0001,018,0002,424,832
2Jul 15, 2023 14:324,266101,970,13434,977,34902,301,952
3Jul 15, 2023 14:324,378107,942,95135,896,81402,187,264
4Jul 15, 2023 14:3257,642541,985,132472,661,64302,314,240
5Jul 15, 2023 14:3257,976500,719,468472,409,0002,996,0002,416,640
6Jul 15, 2023 14:3258,071507,309,199471,189,0004,991,0002,527,232
7Jul 15, 2023 14:3258,089502,821,857472,339,0003,994,0002,453,504
8Jul 15, 2023 14:3258,784506,698,008480,031,0002,000,0002,363,392
9Jul 15, 2023 14:3258,865511,254,929480,697,0001,998,0002,449,408
10Jul 15, 2023 14:3258,987513,590,718481,693,0001,998,0002,301,952
11Jul 15, 2023 14:3258,987514,698,348479,699,0003,997,0002,301,952
12Jul 15, 2023 14:3259,076515,913,215478,434,0005,992,0002,314,240