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 02:07Yuriy LyfenkoYuriy LyfenkoScore: 5,371Success
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 02:075,254567,883,10237,952,0005,128,0002,404,352
2May 7, 2023 02:075,287569,515,76933,271,00010,082,0002,441,216
3May 7, 2023 02:075,307569,273,01238,459,0005,060,0002,502,656
4May 7, 2023 02:075,312568,161,89941,530,0002,025,0002,314,240
5May 7, 2023 02:075,337566,936,87429,837,00013,924,0002,347,008
6May 7, 2023 02:075,364575,567,38137,986,0005,997,0002,338,816
7May 7, 2023 02:075,371568,047,01836,033,0008,007,0002,486,272
8May 7, 2023 02:075,459573,232,89436,808,0007,958,0002,375,680
9May 7, 2023 02:075,519574,898,03634,193,00011,062,0002,453,504
10May 7, 2023 02:075,597617,523,76245,892,62402,228,224
11May 7, 2023 02:075,733623,732,76247,011,09902,318,336
12May 7, 2023 02:075,827613,092,79247,783,06002,232,320