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 listFeb 21, 2024 10:32Huy Duc LeHuy Duc LeScore: 11,329Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2024 10:328,486125,590,99269,584,96702,240,512
2Feb 21, 2024 10:3210,107106,162,32662,906,00019,970,0002,465,792
3Feb 21, 2024 10:3210,621109,711,14363,065,00024,024,0002,445,312
4Feb 21, 2024 10:3211,027151,674,07890,425,49102,248,704
5Feb 21, 2024 10:3211,153113,107,68469,346,00022,110,0002,306,048
6Feb 21, 2024 10:3211,202115,999,91071,887,00019,968,0002,433,024
7Feb 21, 2024 10:3211,329117,626,55077,911,00014,983,0002,445,312
8Feb 21, 2024 10:3211,415117,508,43879,510,00014,090,0002,326,528
9Feb 21, 2024 10:3211,425170,609,56693,684,79802,293,760
10Feb 21, 2024 10:3211,532124,348,73273,440,00021,126,0002,273,280
11Feb 21, 2024 10:3212,131121,594,29482,395,00017,081,0002,420,736
12Feb 21, 2024 10:3212,560129,246,95078,993,00023,997,0002,510,848