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 20, 2024 16:37Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2024 16:1900000Error: No answer to stdout. Died or killed?stderr
2Nov 20, 2024 16:2700000Error: expected "2289296228 ", got "0"stderr
3Nov 20, 2024 16:3300000Error: expected "2257730584 ", got "0"stderr
4Nov 20, 2024 16:3600000Error: expected "2261674646 ", got "0"stderr
5Nov 20, 2024 16:3700000Error: expected "2265113809 ", got "0"stderr
6Nov 20, 2024 16:3800000Error: No answer to stdout. Died or killed?stderr
7Nov 20, 2024 16:3900000Error: No answer to stdout. Died or killed?stderr
8Nov 20, 2024 16:276,48172,436,11545,126,0008,022,0002,400,256
9Nov 20, 2024 16:276,64277,453,45946,397,0008,069,0002,396,160
10Nov 20, 2024 16:366,89378,749,37549,456,0007,065,0002,416,640
11Nov 20, 2024 16:367,43386,434,74952,957,0007,993,0002,478,080
12Nov 20, 2024 16:377,71190,374,21255,202,0008,029,0002,392,064
13Nov 20, 2024 16:378,06997,569,27559,150,0007,017,0002,396,160
14Nov 20, 2024 16:368,18391,053,24160,091,0007,010,0002,404,352
15Nov 20, 2024 16:378,20387,169,01959,232,0008,031,0002,510,848
16Nov 20, 2024 16:278,22788,637,98461,424,0006,041,0002,408,448