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 listFeb 22, 2024 11:02Huy Duc LeHuy Duc LeScore: 11,113Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 22, 2024 11:028,213102,252,19548,251,00019,099,0002,420,736
2Feb 22, 2024 11:029,119101,779,26953,841,00020,938,0002,490,368
3Feb 22, 2024 11:029,851108,530,43660,832,00019,944,0002,482,176
4Feb 22, 2024 11:0210,365165,050,14984,995,45902,256,896
5Feb 22, 2024 11:0210,521108,967,39566,210,00020,063,0002,408,448
6Feb 22, 2024 11:0210,740145,696,48988,069,28402,252,800
7Feb 22, 2024 11:0211,113114,671,01175,105,00016,022,0002,502,656
8Feb 22, 2024 11:0211,198116,109,17672,858,00018,963,0002,310,144
9Feb 22, 2024 11:0211,315119,660,66573,828,00018,955,0002,523,136
10Feb 22, 2024 11:0211,316124,879,20573,836,00018,958,0002,473,984
11Feb 22, 2024 11:0212,385167,717,490101,559,86302,199,552
12Feb 22, 2024 11:0212,946132,373,57892,137,00014,020,0002,469,888