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 19, 2024 18:46zielajzielajScore: 3,041Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 19, 2024 18:463,01351,554,25123,674,0001,029,0002,433,024
2Oct 19, 2024 18:463,03150,308,08021,872,0002,982,0002,527,232
3Oct 19, 2024 18:463,03153,194,38923,862,000994,0002,510,848
4Oct 19, 2024 18:463,03249,014,99223,866,000994,0002,310,144
5Oct 19, 2024 18:463,04152,249,91123,941,000997,0002,494,464
6Oct 19, 2024 18:463,04245,964,58323,947,000997,0002,322,432
7Oct 19, 2024 18:463,04445,963,04321,967,0002,995,0002,281,472
8Oct 19, 2024 18:463,04447,038,24622,967,0001,997,0002,482,176
9Oct 19, 2024 18:463,05154,501,87422,015,0003,002,0002,310,144