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 listNov 11, 2024 10:58Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2024 10:5700000Error: No answer to stdout. Died or killed?stderr
2Nov 11, 2024 10:5800000Error: expected "2265966662 ", got "0 "stderr
3Nov 11, 2024 10:5900000Error: No answer to stdout. Died or killed?stderr
4Nov 11, 2024 11:008,32195,930,50063,215,0005,017,0002,437,120
5Nov 11, 2024 10:588,34996,862,27462,422,0006,040,0002,486,272
6Nov 11, 2024 11:009,04896,125,27469,184,0005,013,0002,531,328
7Nov 11, 2024 10:5810,354107,565,12574,911,0009,988,0002,281,472
8Nov 11, 2024 10:5811,557116,485,28585,696,0009,073,0002,273,280
9Nov 11, 2024 11:0012,927129,175,75694,003,00012,000,0002,379,776