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 listAug 2, 2022 18:41Yuriy 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
1Aug 2, 2022 18:4100000Error: expected "2257283362 ", got "2147483648 "stderr
2Aug 2, 2022 18:4700000Error: expected "2359972301 ", got "2147483648 "stderr
3Aug 2, 2022 18:4800000Error: expected "2095183281 ", got "1803288137 "stderr
4Aug 2, 2022 18:4800000Error: expected "2196138862 ", got "2147483648 "stderr
5Aug 2, 2022 18:4900000Error: expected "2199858167 ", got "2147483648 "stderr
6Aug 2, 2022 18:496,583121,619,50353,979,14102,228,224
7Aug 2, 2022 18:496,584115,538,72353,985,74302,228,224
8Aug 2, 2022 18:496,607121,198,22854,173,75802,224,128