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 07:26Matt 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 07:2600000Error: No answer to stdout. Died or killed?stderr
2Nov 11, 2024 07:2800000Error: expected "2257843432 ", got "0 "stderr
3Nov 11, 2024 07:277,84390,555,47059,285,0005,024,0002,408,448
4Nov 11, 2024 07:268,60895,207,59761,513,0009,075,0002,461,696
5Nov 11, 2024 07:278,613101,446,15664,575,0006,053,0002,535,424
6Nov 11, 2024 07:268,68594,415,74666,206,0005,015,0002,433,024
7Nov 11, 2024 07:269,230101,559,59971,650,0004,036,0002,523,136
8Nov 11, 2024 07:279,580112,598,12073,520,0005,035,0002,359,296