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 listJan 28, 2025 00:16Ian MckibbenIan MckibbenScore: 10,530Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 28, 2025 00:1010,464111,253,01484,804,000997,0002,289,664
2Jan 28, 2025 00:1010,482112,562,08684,953,000999,0002,301,952
3Jan 28, 2025 00:1010,485109,411,48783,976,0001,999,0002,301,952
4Jan 28, 2025 00:1010,498108,670,76685,086,0001,001,0002,412,544
5Jan 28, 2025 00:1010,502111,507,35585,116,0001,001,0002,412,544
6Jan 28, 2025 00:1010,509107,299,60384,167,0002,003,0002,404,352
7Jan 28, 2025 00:1010,527107,448,59986,323,00002,404,352
8Jan 28, 2025 00:1010,530109,843,60285,344,0001,004,0002,293,760
9Jan 28, 2025 00:1010,549112,593,14186,502,00002,285,568
10Jan 28, 2025 00:1610,559109,860,48485,579,0001,006,0002,318,336
11Jan 28, 2025 00:1610,591109,605,94285,847,000998,0002,277,376
12Jan 28, 2025 00:1610,645114,251,04386,286,0001,003,0002,457,600
13Jan 28, 2025 00:1610,783112,943,84387,414,0001,004,0002,310,144
14Jan 28, 2025 00:1610,827114,131,87987,783,000997,0002,453,504
15Jan 28, 2025 00:1610,829116,296,47387,804,000997,0002,445,312