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 14:40Paul MasurelPaul MasurelScore: 20,523Success
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 14:405,95579,099,97744,845,0003,986,0002,342,912
2Jul 13, 2023 14:405,95776,130,38541,869,0006,978,0002,519,040
3Jul 13, 2023 14:405,960126,054,15548,874,60802,277,376
4Jul 13, 2023 14:406,05977,393,53843,602,0006,084,0002,387,968
5Jul 13, 2023 14:406,252118,544,27651,268,79302,269,184
6Jul 13, 2023 14:4020,484191,134,208161,968,0005,998,0002,433,024
7Jul 13, 2023 14:4020,523196,496,204165,287,0003,005,0002,490,368
8Jul 13, 2023 14:4020,632195,518,910163,178,0006,006,0002,465,792
9Jul 13, 2023 14:4020,632200,668,924163,180,0006,006,0002,445,312
10Jul 13, 2023 14:4020,672200,420,102162,528,0006,979,0002,514,944
11Jul 13, 2023 14:4020,859199,249,932168,045,0003,000,0002,322,432
12Jul 13, 2023 14:4020,979247,890,388172,027,08202,289,664