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 00:22Paul MasurelPaul MasurelScore: 20,452Success
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 00:225,92876,727,50042,537,0006,076,0002,433,024
2Jul 15, 2023 00:226,07683,195,48937,866,00011,957,0002,367,488
3Jul 15, 2023 00:226,08574,046,93540,915,0008,981,0002,531,328
4Jul 15, 2023 00:226,411124,198,42852,573,07102,252,800
5Jul 15, 2023 00:226,487114,815,49553,195,32302,256,896
6Jul 15, 2023 00:2220,246195,373,204157,020,0009,001,0002,498,560
7Jul 15, 2023 00:2220,452199,836,982159,718,0007,985,0002,351,104
8Jul 15, 2023 00:2220,469193,744,851162,850,0004,995,0002,400,256
9Jul 15, 2023 00:2220,507197,337,207165,156,0003,002,0002,433,024
10Jul 15, 2023 00:2220,623196,115,746165,108,0004,002,0002,461,696
11Jul 15, 2023 00:2220,651196,831,046164,331,0005,010,0002,293,760
12Jul 15, 2023 00:2220,969239,152,923171,941,81302,260,992