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 15:41Yuriy LyfenkoYuriy LyfenkoError
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 17:0400000Error: expected "2271295120 ", got "0 "stderr
2Jun 13, 2021 16:1200000Error: expected "2267515536 ", got "0 "stderr
3Jun 13, 2021 16:1100000Error: expected "2253332186 ", got "0 "stderr
4Jun 13, 2021 16:1600000Error: expected "2287654634 ", got "0 "stderr
5Jun 13, 2021 16:1600000Error: expected "2180723142 ", got "0 "stderr
6Jun 13, 2021 16:1700000Error: expected "2362100334 ", got "0 "stderr
7Jun 13, 2021 16:1700000Error: expected "2219026628 ", got "0 "stderr
8Jun 13, 2021 16:1800000Error: expected "2069809341 ", got "878482082 "stderr
9Jun 13, 2021 16:1800000Error: expected "2212525223 ", got "0 "stderr
10Jun 13, 2021 17:046,702111,236,04154,952,81002,232,320
11Jun 13, 2021 17:046,704120,135,88454,974,80102,215,936
12Jun 13, 2021 16:106,737119,769,74955,245,28102,240,512
13Jun 13, 2021 17:046,740136,838,92755,269,62402,220,032
14Jun 13, 2021 16:106,791122,974,97255,683,56902,273,280
15Jun 13, 2021 16:106,793126,036,32055,699,78402,224,128
16Jun 13, 2021 16:126,799117,025,83455,751,03802,220,032
17Jun 13, 2021 16:126,812111,384,13255,855,12802,228,224
18Jun 13, 2021 16:126,967126,383,44957,126,91002,224,128
19Jun 13, 2021 15:417,254126,747,17259,481,71202,277,376
20Jun 13, 2021 15:417,27588,333,93443,475,00016,177,0002,338,816
21Jun 13, 2021 15:417,31887,670,56948,004,00012,001,0002,449,408
22Jun 13, 2021 15:417,41697,420,13842,868,00017,944,0002,486,272
23Jun 13, 2021 15:417,43391,395,46743,965,00016,986,0002,494,464
24Jun 13, 2021 15:417,476122,252,33861,306,29702,236,416
25Jun 13, 2021 15:417,50584,909,19743,382,00018,160,0002,486,272
26Jun 13, 2021 15:417,56287,417,13641,006,00021,003,0002,445,312
27Jun 13, 2021 15:417,57292,921,19545,063,00017,024,0002,478,080
28Jun 13, 2021 15:417,66890,419,27443,913,00018,962,0002,494,464
29Jun 13, 2021 15:417,73787,132,99550,350,00013,091,0002,338,816
30Jun 13, 2021 15:418,106122,364,68866,471,57202,228,224