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 listJul 16, 2023 19:29Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2023 19:3000000Error: expected "2103824899 ", got "2078049588 "stderr
2Jul 16, 2023 19:3100000Error: expected "2231912709 ", got "2147483648 "stderr
3Jul 16, 2023 19:325,751618,633,64747,155,81502,322,432
4Jul 16, 2023 19:325,787619,595,17447,452,82402,289,664
5Jul 16, 2023 19:325,881611,381,87548,220,37402,199,552
6Jul 16, 2023 19:296,095609,482,08749,977,99602,301,952
7Jul 16, 2023 19:296,112615,105,60450,115,50902,215,936
8Jul 16, 2023 19:296,224608,920,44651,036,90202,248,704