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 17:20gchebanovgchebanovScore: 5,194Success
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 17:205,02867,685,81937,206,0004,022,0002,396,160
2Jul 13, 2023 17:205,04464,557,06737,323,0004,035,0002,490,368
3Jul 13, 2023 17:205,05763,551,77037,423,0004,045,0002,379,776
4Jul 13, 2023 17:205,06467,710,20837,476,0004,051,0002,347,008
5Jul 13, 2023 17:205,07268,772,97934,492,0007,101,0002,351,104
6Jul 13, 2023 17:205,15365,164,80039,235,0003,018,0002,322,432
7Jul 13, 2023 17:205,194104,252,18442,588,27802,306,048
8Jul 13, 2023 17:205,20068,629,53838,582,0004,061,0002,445,312
9Jul 13, 2023 17:205,22273,166,35039,836,0002,987,0002,433,024
10Jul 13, 2023 17:205,274111,585,60343,249,09502,236,416
11Jul 13, 2023 17:205,312105,401,70043,554,46102,297,856
12Jul 13, 2023 17:205,48269,808,34539,961,0004,995,0002,363,392