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 06:48Paul MasurelPaul MasurelScore: 19,746Success
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 06:484,51265,820,93331,000,0006,000,0002,416,640
2Jul 15, 2023 06:484,535107,892,52937,186,46502,248,704
3Jul 15, 2023 06:484,577111,615,61637,531,17102,314,240
4Jul 15, 2023 06:486,74882,830,38933,199,00022,132,0002,465,792
5Jul 15, 2023 06:4819,617199,706,178156,860,0003,996,0002,301,952
6Jul 15, 2023 06:4819,686186,175,756158,418,0003,007,0002,498,560
7Jul 15, 2023 06:4819,746190,572,210156,919,0004,997,0002,285,568
8Jul 15, 2023 06:4819,763188,183,367158,058,0004,001,0002,478,080
9Jul 15, 2023 06:4819,790190,180,295157,274,0005,008,0002,363,392
10Jul 15, 2023 06:4820,074226,945,011164,609,81202,289,664
11Jul 15, 2023 06:4822,364206,863,925158,331,00025,052,0002,355,200
12Jul 15, 2023 06:4822,451207,073,336161,088,00023,012,0002,314,240