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 13, 2023 05:12Paul MasurelPaul MasurelScore: 11,476Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2023 05:1211,071116,786,52585,793,0004,987,0002,420,736
2Jul 13, 2023 05:1211,171115,473,94982,540,0009,059,0002,506,752
3Jul 13, 2023 05:1211,189117,808,57181,777,0009,972,0002,330,624
4Jul 13, 2023 05:1211,207116,400,10284,909,0006,992,0002,281,472
5Jul 13, 2023 05:1211,315116,602,13188,791,0003,990,0002,433,024
6Jul 13, 2023 05:1211,459168,331,16193,965,32002,277,376
7Jul 13, 2023 05:1211,476152,163,76094,102,05902,285,568
8Jul 13, 2023 05:1211,534121,632,44088,542,0006,037,0002,400,256
9Jul 13, 2023 05:1225,924238,400,652209,581,0002,994,0002,277,376
10Jul 13, 2023 05:1226,068283,731,856213,757,35102,215,936
11Jul 13, 2023 05:1226,172240,883,098208,623,0005,989,0002,371,584
12Jul 13, 2023 05:1226,309239,547,209209,744,0005,992,0002,367,488