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 listMay 29, 2024 21:10Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 29, 2024 21:1500000Error: No answer to stdout. Died or killed?stderr
2May 29, 2024 21:1500000Error: No answer to stdout. Died or killed?stderr
3May 29, 2024 21:1500000Error: expected "2222604536 ", got "0"stderr
4May 29, 2024 21:1500000Error: expected "2195088829 ", got "0"stderr
5May 29, 2024 21:1400000Error: expected "2199674991 ", got "0"stderr
6May 29, 2024 21:1400000Error: No answer to stdout. Died or killed?stderr
7May 29, 2024 21:1500000Error: expected "2216302730 ", got "0"stderr
8May 29, 2024 21:1500000Error: No answer to stdout. Died or killed?stderr
9May 29, 2024 21:1500000Error: expected "2273419449 ", got "0"stderr
10May 29, 2024 21:157,152131,224,52258,649,53502,224,128
11May 29, 2024 21:157,745127,943,18663,505,12002,269,184
12May 29, 2024 21:158,001137,675,55165,607,82502,293,760
13May 29, 2024 21:108,51694,474,30762,847,0006,983,0002,383,872
14May 29, 2024 21:108,68697,719,13161,195,00010,032,0002,482,176
15May 29, 2024 21:108,859101,223,10965,579,0007,062,0002,416,640
16May 29, 2024 21:108,90696,852,58261,024,00012,004,0002,273,280
17May 29, 2024 21:109,061144,899,14474,300,70702,310,144
18May 29, 2024 21:109,19096,581,30365,308,00010,047,0002,322,432
19May 29, 2024 21:109,266104,293,69966,986,0008,998,0002,359,296
20May 29, 2024 21:109,307105,251,20265,270,00011,045,0002,342,912
21May 29, 2024 21:109,490103,807,05667,838,0009,976,0002,383,872
22May 29, 2024 21:109,649105,949,96569,110,00010,015,0002,412,544
23May 29, 2024 21:109,823158,901,45280,546,44202,203,648
24May 29, 2024 21:1010,132171,272,05583,084,57502,281,472