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 20, 2022 07:05Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2022 07:0300000Error: expected "2294336511 ", got "1"
2Nov 20, 2022 07:0510,506107,716,63977,132,0009,015,0002,293,760
3Nov 20, 2022 07:0510,684114,238,51974,517,00013,090,0002,359,296
4Nov 20, 2022 07:0510,871113,018,95080,125,0009,014,0002,318,336
5Nov 20, 2022 07:0511,034153,233,87690,482,42302,281,472
6Nov 20, 2022 07:0511,054119,476,43774,527,00016,114,0002,322,432
7Nov 20, 2022 07:0511,099115,755,20178,013,00013,002,0002,314,240
8Nov 20, 2022 07:0511,144124,235,06783,346,0008,033,0002,404,352
9Nov 20, 2022 07:0511,220163,013,27492,003,02702,244,608
10Nov 20, 2022 07:0511,251115,129,27378,219,00014,039,0002,424,832
11Nov 20, 2022 07:0511,274113,576,32283,402,0009,043,0002,473,984
12Nov 20, 2022 07:0511,335167,021,65392,944,28502,293,760
13Nov 20, 2022 07:0511,373111,586,63486,240,0007,019,0002,269,184
14Nov 20, 2022 07:0511,744153,110,30496,303,68302,297,856
15Nov 20, 2022 07:0512,070180,265,77598,977,08102,199,552
16Nov 20, 2022 07:0512,294158,312,986100,810,67202,232,320