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 listFeb 21, 2024 10:26Huy Duc LeHuy Duc LeScore: 10,895Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2024 10:268,514101,401,66252,861,00016,955,0002,351,104
2Feb 21, 2024 10:268,996140,382,11373,766,05902,191,360
3Feb 21, 2024 10:269,987106,591,64462,919,00018,975,0002,383,872
4Feb 21, 2024 10:2610,221111,292,55960,862,00022,948,0002,355,200
5Feb 21, 2024 10:2610,258107,824,14166,088,00018,024,0002,363,392
6Feb 21, 2024 10:2610,760115,260,52274,198,00014,037,0002,355,200
7Feb 21, 2024 10:2610,895117,544,80469,265,00020,077,0002,514,944
8Feb 21, 2024 10:2610,962113,652,57474,906,00014,981,0002,453,504
9Feb 21, 2024 10:2611,868120,038,54478,257,00019,062,0002,449,408
10Feb 21, 2024 10:2612,138166,299,20499,535,02302,273,280
11Feb 21, 2024 10:2612,170129,510,35281,829,00017,962,0002,441,216
12Feb 21, 2024 10:2612,198157,965,608100,022,24602,191,360