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 listJul 15, 2023 06:43Paul MasurelPaul MasurelScore: 20,684Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 06:436,03479,257,33344,430,0005,048,0002,314,240
2Jul 15, 2023 06:436,03676,037,59641,414,0008,080,0002,486,272
3Jul 15, 2023 06:436,05576,022,77046,613,0003,040,0002,392,064
4Jul 15, 2023 06:436,13680,499,90242,267,0008,050,0002,338,816
5Jul 15, 2023 06:436,625113,900,96354,328,26602,301,952
6Jul 15, 2023 06:436,792121,756,62655,690,73202,228,224
7Jul 15, 2023 06:4320,684195,498,761158,631,00010,974,0002,396,160
8Jul 15, 2023 06:4320,843201,639,231162,918,0007,995,0002,383,872
9Jul 15, 2023 06:4320,891198,997,024167,296,0004,007,0002,375,680
10Jul 15, 2023 06:4320,938196,416,292161,709,0009,982,0002,297,856
11Jul 15, 2023 06:4321,059197,234,111167,694,0004,990,0002,334,720
12Jul 15, 2023 06:4321,280246,411,096174,493,97202,244,608