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 listOct 17, 2024 00:53zielajzielajScore: 3,415Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 17, 2024 00:533,39551,973,20925,855,0001,988,0002,273,280
2Oct 17, 2024 00:533,39756,276,09924,871,0002,984,0002,281,472
3Oct 17, 2024 00:533,39952,762,63525,880,0001,990,0002,428,928
4Oct 17, 2024 00:533,40453,195,33224,920,0002,990,0002,482,176
5Oct 17, 2024 00:533,40550,190,45926,926,000997,0002,453,504
6Oct 17, 2024 00:533,40551,979,35925,924,0001,994,0002,453,504
7Oct 17, 2024 00:533,40655,940,66326,932,000997,0002,433,024
8Oct 17, 2024 00:533,40851,604,93024,949,0002,993,0002,351,104
9Oct 17, 2024 00:533,41349,266,63124,987,0002,998,0002,473,984
10Oct 17, 2024 00:533,41548,624,91926,003,0002,000,0002,506,752
11Oct 17, 2024 00:533,41651,229,51024,007,0004,001,0002,424,832
12Oct 17, 2024 00:533,41650,061,52226,009,0002,000,0002,392,064
13Oct 17, 2024 00:533,41750,965,78326,021,0002,001,0002,347,008
14Oct 17, 2024 00:533,42050,062,15826,039,0002,003,0002,433,024
15Oct 17, 2024 00:533,42159,006,35326,047,0002,003,0002,396,160
16Oct 17, 2024 00:533,42751,321,86025,088,0003,010,0002,301,952
17Oct 17, 2024 00:533,43050,831,70026,114,0002,008,0002,535,424
18Oct 17, 2024 00:533,43348,608,86926,137,0002,010,0002,306,048