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 17, 2024 22:49Joad 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 17, 2024 22:5000000Error: No answer to stdout. Died or killed?
2May 17, 2024 22:5000000Error: expected "2230620621 ", got "0"
3May 17, 2024 22:5000000Error: No answer to stdout. Died or killed?
4May 17, 2024 22:5000000Error: No answer to stdout. Died or killed?
5May 17, 2024 22:5017,981216,684,295147,447,74602,273,280
6May 17, 2024 22:5018,473217,025,500151,480,28002,215,936
7May 17, 2024 22:5020,123238,750,263165,008,42602,273,280
8May 17, 2024 22:4921,187232,640,639173,731,33902,301,952
9May 17, 2024 22:4921,519233,115,297176,452,73702,179,072
10May 17, 2024 22:4922,113255,973,905181,329,87302,220,032
11May 17, 2024 22:3824,358271,105,275199,737,75202,207,744
12May 17, 2024 22:3825,408266,565,372208,341,53202,240,512
13May 17, 2024 22:4925,555266,951,445209,550,75602,207,744
14May 17, 2024 22:4925,599265,801,987209,913,62702,285,568
15May 17, 2024 22:4926,024284,078,251213,393,98502,273,280
16May 17, 2024 22:3826,071267,049,148213,782,90802,195,456