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 listMay 7, 2023 04:36Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2023 04:3600000Error: expected "2238924554 ", got "2147483648 "stderr
2May 7, 2023 04:3700000Error: expected "2202014482 ", got "2147483648 "stderr
3May 7, 2023 04:3700000Error: expected "2201060042 ", got "2147483648 "stderr
4May 7, 2023 04:3700000Error: expected "2033664957 ", got "2782389905 "stderr
5May 7, 2023 04:3900000Error: expected "2033329328 ", got "360107060 "stderr
6May 7, 2023 04:3900000Error: expected "2081259003 ", got "1216998987 "stderr
7May 7, 2023 04:394,670100,075,02738,297,12102,277,376
8May 7, 2023 04:394,733112,286,16838,810,15702,256,896
9May 7, 2023 04:394,898100,878,77140,159,80402,314,240
10May 7, 2023 04:365,209119,399,91142,710,56002,289,664
11May 7, 2023 04:365,216111,980,83042,768,21802,289,664
12May 7, 2023 04:365,301117,439,64343,469,61302,207,744