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 listOct 18, 2024 17:58Sybrand AarnoutseSybrand AarnoutseScore: 105,157Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 18, 2024 17:5888,608749,068,479530,695,000195,887,0002,502,656
2Oct 18, 2024 17:5890,542766,772,014541,595,000200,850,0002,306,048
3Oct 18, 2024 17:5892,185782,345,672551,938,000203,977,0002,486,272
4Oct 18, 2024 17:58102,437869,864,818631,234,000208,746,0002,347,008
5Oct 18, 2024 17:58105,157887,648,363662,454,000199,835,0002,306,048
6Oct 18, 2024 17:58113,598963,439,774733,612,000197,895,0002,359,296
7Oct 18, 2024 17:58116,750982,610,048766,482,000190,871,0002,383,872
8Oct 18, 2024 17:58117,867997,113,152762,613,000203,896,0002,416,640
9Oct 18, 2024 17:58118,719998,400,843774,597,000198,896,0002,265,088