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 13, 2023 14:55Paul MasurelPaul MasurelScore: 18,518Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2023 14:5618,077229,850,205148,235,09702,269,184
2Jul 13, 2023 14:5418,366215,331,979150,600,09502,244,608
3Jul 13, 2023 14:5518,418212,247,899151,025,52102,252,800
4Jul 13, 2023 14:5518,454219,805,777151,321,24402,195,456
5Jul 13, 2023 14:5518,459222,776,992151,360,74702,252,800
6Jul 13, 2023 14:5418,460222,368,110151,370,63702,220,032
7Jul 13, 2023 14:5618,512217,323,701151,796,45502,293,760
8Jul 13, 2023 14:5618,518212,900,894151,844,14202,215,936
9Jul 13, 2023 14:5618,542235,920,179152,044,82902,281,472
10Jul 13, 2023 14:5618,585218,151,338152,393,25902,211,840
11Jul 13, 2023 14:5518,612210,944,199152,615,04402,236,416
12Jul 13, 2023 14:5618,620215,313,146152,683,97902,273,280
13Jul 13, 2023 14:5418,658214,318,049152,998,92402,297,856
14Jul 13, 2023 14:5518,829230,845,126154,397,18702,252,800
15Jul 13, 2023 14:5518,875229,116,241154,772,44102,289,664