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 listNov 8, 2024 07:49Matt StuchlikMatt StuchlikScore: 972,180Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 8, 2024 07:50962,5817,923,729,8567,691,343,000201,825,0002,453,504
2Nov 8, 2024 07:55964,3467,947,912,7647,697,809,000209,831,0002,367,488
3Nov 8, 2024 07:49964,6597,939,912,1167,705,354,000204,849,0002,281,472
4Nov 8, 2024 07:55966,5207,960,840,9107,719,632,000205,830,0002,281,472
5Nov 8, 2024 07:46967,0217,967,577,8997,730,736,000198,838,0002,306,048
6Nov 8, 2024 07:52967,6797,964,870,6997,726,130,000208,841,0002,281,472
7Nov 8, 2024 07:52968,9347,979,607,9217,740,434,000204,826,0002,281,472
8Nov 8, 2024 07:53970,6647,989,696,3077,760,611,000198,836,0002,310,144
9Nov 8, 2024 07:53970,6647,993,557,6757,755,613,000203,832,0002,281,472
10Nov 8, 2024 07:55970,9127,996,818,1777,756,647,000204,832,0002,281,472
11Nov 8, 2024 07:51971,2478,002,520,8957,765,368,000198,855,0002,281,472
12Nov 8, 2024 07:47971,4988,000,197,5307,765,452,000200,830,0002,281,472
13Nov 8, 2024 07:53972,1808,006,457,1217,768,035,000203,843,0002,281,472
14Nov 8, 2024 07:50972,1898,005,105,7417,772,099,000199,848,0002,281,472
15Nov 8, 2024 07:46972,8578,009,618,9077,774,592,000202,832,0002,461,696
16Nov 8, 2024 07:51974,2868,017,411,3507,799,285,000189,860,0002,314,240
17Nov 8, 2024 07:47974,7788,025,997,1857,787,333,000205,850,0002,301,952
18Nov 8, 2024 07:50976,4528,042,012,1197,808,057,000198,848,0002,301,952
19Nov 8, 2024 07:46976,8258,044,001,6237,805,142,000204,820,0002,297,856
20Nov 8, 2024 07:47977,2098,044,909,5777,812,265,000200,852,0002,281,472
21Nov 8, 2024 07:51977,4248,053,071,9777,807,060,000207,815,0002,318,336
22Nov 8, 2024 07:49980,8358,073,018,3897,844,995,000197,848,0002,281,472
23Nov 8, 2024 07:52983,3158,099,262,4207,859,334,000203,853,0002,281,472
24Nov 8, 2024 07:49984,6358,111,420,7287,875,182,000198,827,0002,281,472