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 listFeb 22, 2024 11:03Huy Duc LeHuy Duc LeScore: 10,305Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 22, 2024 11:038,65697,291,81054,984,00015,995,0002,424,832
2Feb 22, 2024 11:039,853111,672,22065,830,00014,961,0002,502,656
3Feb 22, 2024 11:039,982110,049,99962,889,00018,966,0002,379,776
4Feb 22, 2024 11:0310,129146,868,42683,053,75202,244,608
5Feb 22, 2024 11:0310,167158,279,25783,368,33302,240,512
6Feb 22, 2024 11:0310,283109,068,17966,255,00018,069,0002,441,216
7Feb 22, 2024 11:0310,305158,796,64684,499,99402,211,840
8Feb 22, 2024 11:0310,348111,085,60965,887,00018,967,0002,420,736
9Feb 22, 2024 11:0310,464115,435,02864,853,00020,952,0002,519,040
10Feb 22, 2024 11:0310,865113,551,34473,075,00016,016,0002,306,048
11Feb 22, 2024 11:0311,347116,131,60771,032,00022,010,0002,527,232
12Feb 22, 2024 11:0312,569131,658,41279,048,00024,014,0002,310,144