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 listNov 27, 2026 08:45janwwwjanwwwError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 27, 2026 08:4501,168,141,0761,159,303,0001,006,00020,480Exit with code 1: P3 N=100000000 median=2167591455 bucket16 nonzero=65536 min=1233 max=2246 top8 (k): 350 351 350 351 352 350 351 351 352 352 352 352 352 352 353 352 353 352 352 353 352 354 352 354 354 355 356 357 358 359 360 365 366 368 371 375 378 38...stderr