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 13, 2024 21:44zielajzielajError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 13, 2024 21:3900000Error: expected "2098873604 ", got "2147541023 "stderr
2Oct 13, 2024 21:447,10978,827,94244,224,00014,071,0002,510,848
3Oct 13, 2024 21:447,17578,046,77543,878,00014,958,0002,469,888
4Oct 13, 2024 21:447,43880,422,16645,994,00014,998,0002,347,008
5Oct 13, 2024 21:447,44583,878,09547,036,00014,010,0002,527,232
6Oct 13, 2024 21:447,51086,752,73446,440,00015,143,0002,273,280
7Oct 13, 2024 21:447,54084,583,35251,857,0009,972,0002,449,408
8Oct 13, 2024 21:447,58885,553,93651,181,00011,039,0002,457,600
9Oct 13, 2024 21:447,66384,937,32449,869,00012,966,0002,482,176
10Oct 13, 2024 21:447,81191,222,27851,038,00013,009,0002,469,888