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 listJan 10, 2025 07:07Ian MckibbenIan MckibbenError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 10, 2025 08:0000000Error: No answer to stdout. Died or killed?
2Jan 10, 2025 07:0500000Error: expected "2332632820 ", got "0"
3Jan 10, 2025 06:1650,913444,997,994396,511,00020,974,0002,445,312
4Jan 10, 2025 06:1652,261457,522,319406,567,00021,976,0002,347,008
5Jan 10, 2025 06:1652,781464,576,780412,812,00019,990,0002,486,272
6Jan 10, 2025 06:1653,294465,428,741420,014,00017,000,0002,363,392
7Jan 10, 2025 06:1653,314467,350,325421,168,00016,006,0002,469,888
8Jan 10, 2025 06:1653,730466,944,765422,600,00017,983,0002,457,600
9Jan 10, 2025 06:1654,396478,935,581422,042,00024,002,0002,293,760
10Jan 10, 2025 06:1655,495485,428,347428,052,00027,003,0002,433,024
11Jan 10, 2025 06:1656,881494,270,385450,445,00015,980,0002,465,792
12Jan 10, 2025 08:0162,642541,805,822491,681,00021,985,0002,453,504
13Jan 10, 2025 08:0164,673555,400,486508,346,00021,971,0002,453,504
14Jan 10, 2025 08:0165,968564,072,472514,940,00025,997,0002,449,408
15Jan 10, 2025 07:0773,531626,458,132582,954,00019,998,0002,465,792
16Jan 10, 2025 07:0774,615642,704,225596,846,00014,996,0002,371,584
17Jan 10, 2025 07:0776,394652,364,810609,449,00016,984,0002,473,984