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 listAug 2, 2022 17:48Yuriy LyfenkoYuriy LyfenkoScore: 6,975Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 2, 2022 17:486,91287,769,21042,507,00014,169,0002,502,656
2Aug 2, 2022 17:486,92985,416,97938,875,00017,942,0002,502,656
3Aug 2, 2022 17:486,94187,065,30638,944,00017,974,0002,326,528
4Aug 2, 2022 17:486,95281,623,33540,002,00017,001,0002,301,952
5Aug 2, 2022 17:486,95585,106,56242,026,00015,009,0002,494,464
6Aug 2, 2022 17:486,96682,221,35938,083,00019,041,0002,498,560
7Aug 2, 2022 17:486,97283,545,93141,121,00016,047,0002,498,560
8Aug 2, 2022 17:486,97584,149,72040,135,00017,057,0002,498,560
9Aug 2, 2022 17:486,993121,357,95757,340,97602,236,416
10Aug 2, 2022 17:487,00884,448,08139,316,00018,146,0002,293,760
11Aug 2, 2022 17:487,032121,799,39457,666,44102,236,416
12Aug 2, 2022 17:407,094109,642,23158,173,80102,293,760
13Aug 2, 2022 17:407,150120,626,66358,631,15202,224,128
14Aug 2, 2022 17:407,155141,617,45658,673,56402,220,032
15Aug 2, 2022 17:487,198123,241,45459,023,06902,191,360