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:44Paul MasurelPaul MasurelScore: 6,610Success
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:445,75671,121,88237,156,00010,042,0002,277,376
2Jul 15, 2023 06:445,92274,003,29244,517,0004,047,0002,404,352
3Jul 15, 2023 06:445,93374,233,31041,559,0007,095,0002,371,584
4Jul 15, 2023 06:445,98079,777,21542,029,0007,004,0002,281,472
5Jul 15, 2023 06:446,098112,031,69450,004,53902,297,856
6Jul 15, 2023 06:446,10877,760,27443,074,0007,012,0002,482,176
7Jul 15, 2023 06:446,610117,752,42254,202,87602,232,320
8Jul 15, 2023 06:4420,658195,720,771157,368,00012,028,0002,363,392
9Jul 15, 2023 06:4420,729199,070,970162,978,0006,999,0002,297,856
10Jul 15, 2023 06:4420,768194,525,830159,275,00011,019,0002,424,832
11Jul 15, 2023 06:4420,867231,922,816171,105,68702,195,456
12Jul 15, 2023 06:4420,990201,310,419164,111,0008,005,0002,301,952