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 15, 2023 14:24Paul MasurelPaul MasurelScore: 51,637Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 14:249,190147,814,23075,361,91602,265,088
2Jul 15, 2023 14:249,335101,066,26763,451,00013,093,0002,281,472
3Jul 15, 2023 14:249,515103,375,51261,015,00017,004,0002,404,352
4Jul 15, 2023 14:249,962153,865,03381,684,97602,297,856
5Jul 15, 2023 14:2410,096115,769,10664,836,00017,954,0002,326,528
6Jul 15, 2023 14:2410,306116,200,19174,452,00010,061,0002,285,568
7Jul 15, 2023 14:2451,637493,019,845423,425,99502,236,416
8Jul 15, 2023 14:2451,835453,570,660414,042,00011,001,0002,359,296
9Jul 15, 2023 14:2451,838449,784,763413,072,00012,002,0002,445,312
10Jul 15, 2023 14:2452,021455,229,634414,586,00011,988,0002,441,216
11Jul 15, 2023 14:2452,075455,491,266412,012,00015,000,0002,326,528
12Jul 15, 2023 14:2452,193452,057,587410,985,00016,999,0002,322,432