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 listJun 13, 2021 05:33Yuriy LyfenkoYuriy LyfenkoScore: 7,467Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 13, 2021 05:347,198131,396,10259,027,47602,215,936
2Jun 13, 2021 05:347,29285,265,86142,854,00016,942,0002,502,656
3Jun 13, 2021 05:347,318115,985,03460,007,22502,228,224
4Jun 13, 2021 05:337,36288,971,42843,266,00017,105,0002,490,368
5Jun 13, 2021 05:347,36787,604,16146,312,00014,095,0002,527,232
6Jun 13, 2021 05:337,367127,263,63760,409,01902,228,224
7Jun 13, 2021 05:347,401123,559,10860,691,28602,220,032
8Jun 13, 2021 05:337,405133,703,64760,720,08402,215,936
9Jun 13, 2021 05:347,41887,935,33544,873,00015,955,0002,498,560
10Jun 13, 2021 05:337,42592,668,21638,929,00021,960,0002,449,408
11Jun 13, 2021 05:337,42688,127,68240,930,00019,966,0002,486,272
12Jun 13, 2021 05:347,44690,041,03843,039,00018,016,0002,490,368
13Jun 13, 2021 05:347,46782,325,78743,164,00018,068,0002,461,696
14Jun 13, 2021 05:337,47391,113,67445,204,00016,072,0002,433,024
15Jun 13, 2021 05:337,51593,939,56846,469,00015,153,0002,355,200
16Jun 13, 2021 05:337,53888,938,17341,873,00019,939,0002,498,560
17Jun 13, 2021 05:337,53990,112,83147,634,00014,188,0002,465,792
18Jun 13, 2021 05:337,59489,611,25742,185,00020,088,0002,457,600
19Jun 13, 2021 05:347,60690,046,03445,270,00017,102,0002,510,848
20Jun 13, 2021 05:337,642128,571,97362,666,77202,228,224
21Jun 13, 2021 05:347,66593,915,48644,894,00017,957,0002,310,144
22Jun 13, 2021 05:337,67991,124,22543,978,00018,990,0002,486,272
23Jun 13, 2021 05:347,69696,601,59442,072,00021,036,0002,494,464
24Jun 13, 2021 05:348,48598,317,75647,394,00022,184,0002,478,080