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:27zielajzielajScore: 3,213Success
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:273,19352,637,02724,169,0002,014,0002,375,680
2Oct 19, 2024 18:273,19549,251,40624,183,0002,015,0002,322,432
3Oct 19, 2024 18:273,19951,368,33023,207,0003,027,0002,355,200
4Oct 19, 2024 18:273,20048,900,39722,203,0004,036,0002,416,640
5Oct 19, 2024 18:273,21353,093,26525,373,000975,0002,510,848
6Oct 19, 2024 18:273,21457,447,08024,325,0002,027,0002,465,792
7Oct 19, 2024 18:273,23153,233,77824,458,0002,038,0002,412,544
8Oct 19, 2024 18:273,23448,408,33325,501,0001,020,0002,478,080
9Oct 19, 2024 18:273,24162,452,64626,579,00002,363,392