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 listSep 8, 2024 15:51Yuriy LyfenkoYuriy LyfenkoScore: 4,359Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 8, 2024 16:144,010562,098,19230,888,0001,992,0002,514,944
2Sep 8, 2024 16:144,015560,189,54930,925,0001,995,0002,277,376
3Sep 8, 2024 16:354,026557,477,81631,013,0002,000,0002,424,832
4Sep 8, 2024 16:144,029561,439,98831,035,0002,002,0002,363,392
5Sep 8, 2024 16:354,031561,958,99430,050,0003,005,0002,326,528
6Sep 8, 2024 16:144,033562,052,02131,070,0002,004,0002,330,624
7Sep 8, 2024 16:144,046562,761,92231,165,0002,010,0002,502,656
8Sep 8, 2024 16:144,057564,117,19632,258,0001,008,0002,392,064
9Sep 8, 2024 16:144,058560,911,59732,265,0001,008,0002,322,432
10Sep 8, 2024 16:144,061556,783,47628,254,0005,045,0002,445,312
11Sep 8, 2024 16:354,116560,425,33630,771,0002,977,0002,297,856
12Sep 8, 2024 16:094,117563,344,70432,765,000992,0002,363,392
13Sep 8, 2024 16:094,125563,430,85530,840,0002,984,0002,306,048
14Sep 8, 2024 16:094,156561,037,60830,074,0004,009,0002,363,392
15Sep 8, 2024 16:094,160564,121,72733,107,0001,003,0002,359,296
16Sep 8, 2024 16:094,164560,589,85932,137,0002,008,0002,498,560
17Sep 8, 2024 16:094,166558,198,55832,149,0002,009,0002,306,048
18Sep 8, 2024 16:094,172560,353,30332,202,0002,012,0002,453,504
19Sep 8, 2024 16:094,195565,603,57631,361,0003,035,0002,461,696
20Sep 8, 2024 16:094,210567,122,15232,490,0002,030,0002,273,280
21Sep 8, 2024 16:144,215567,824,88132,530,0002,033,0002,404,352
22Sep 8, 2024 15:524,312560,287,02934,346,0001,010,0002,392,064
23Sep 8, 2024 15:524,325562,660,79129,386,0006,079,0002,371,584
24Sep 8, 2024 15:524,344561,937,45833,640,0001,978,0002,494,464
25Sep 8, 2024 15:524,359566,650,97933,761,0001,985,0002,420,736
26Sep 8, 2024 15:524,360564,580,75534,760,000993,0002,310,144
27Sep 8, 2024 15:524,360569,464,45931,783,0003,972,0002,437,120
28Sep 8, 2024 15:524,372561,506,10130,870,0004,979,0002,502,656
29Sep 8, 2024 15:524,444561,273,21434,470,0001,969,0002,445,312
30Sep 8, 2024 15:524,460562,182,41832,511,0004,063,0002,334,720
31Sep 8, 2024 15:514,499565,306,83631,906,0004,985,0002,342,912
32Sep 8, 2024 15:514,509559,214,86531,974,0004,996,0002,465,792
33Sep 8, 2024 15:514,510564,256,27832,981,0003,997,0002,326,528
34Sep 8, 2024 15:514,511566,391,12132,992,0003,999,0002,289,664
35Sep 8, 2024 15:514,532563,289,23034,149,0003,013,0002,342,912
36Sep 8, 2024 15:514,534564,925,56836,177,0001,004,0002,293,760
37Sep 8, 2024 15:514,535563,007,75235,181,0002,010,0002,506,752
38Sep 8, 2024 15:514,539567,276,28735,209,0002,011,0002,465,792
39Sep 8, 2024 15:514,555563,345,98633,314,0004,038,0002,363,392
40Sep 8, 2024 15:514,557563,238,84234,335,0003,029,0002,355,200
41Sep 8, 2024 15:514,560566,345,91232,342,0005,053,0002,314,240
42Sep 8, 2024 15:514,569563,560,38535,439,0002,025,0002,465,792
43Sep 8, 2024 15:514,577561,415,03030,430,0007,100,0002,318,336
44Sep 8, 2024 15:514,602565,286,64234,759,0002,979,0002,359,296
45Sep 8, 2024 15:514,631562,401,31033,979,0003,997,0002,416,640
46Sep 8, 2024 15:514,638564,248,25836,029,0002,001,0002,387,968
47Sep 8, 2024 15:514,643564,135,03033,063,0005,009,0002,326,528
48Sep 8, 2024 15:514,649563,738,43531,098,0007,022,0002,494,464