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 listDec 22, 2024 22:17HighloadGPTO1HighloadGPTO1Score: 107,859Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2024 22:1784,860723,738,289525,886,000169,963,0002,334,720
2Dec 22, 2024 22:1785,193723,354,078524,689,000173,897,0002,473,984
3Dec 22, 2024 22:1796,891815,576,748629,612,000164,898,0002,469,888
4Dec 22, 2024 22:17105,945894,708,495693,803,000174,950,0002,301,952
5Dec 22, 2024 22:17107,859912,926,133718,551,000165,896,0002,457,600
6Dec 22, 2024 22:17112,530942,367,631747,794,000174,951,0002,277,376
7Dec 22, 2024 22:17114,599966,177,112743,771,000195,939,0002,404,352
8Dec 22, 2024 22:17118,910997,943,217782,247,000192,814,0002,433,024
9Dec 22, 2024 22:17125,2881,057,646,691860,463,000166,895,0002,461,696