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 listOct 18, 2024 17:37Sybrand AarnoutseSybrand AarnoutseScore: 310,420Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 18, 2024 17:37150,1561,399,864,234784,082,000447,195,0002,490,368
2Oct 18, 2024 17:37211,2182,052,652,691994,972,000737,016,0002,379,776
3Oct 18, 2024 17:37223,3262,245,525,0731,024,355,000806,916,0002,289,664
4Oct 18, 2024 17:37273,3982,924,528,5701,146,859,0001,095,001,0002,338,816
5Oct 18, 2024 17:37310,4203,332,197,4591,226,542,0001,318,905,0002,351,104
6Oct 18, 2024 17:37316,7413,622,673,7821,264,321,0001,332,958,0002,453,504
7Oct 18, 2024 17:37371,5309,554,814,3241,189,194,0001,857,350,0002,457,600
8Oct 18, 2024 17:37425,0875,924,568,7591,457,445,0002,028,270,0002,555,904
9Oct 18, 2024 17:37549,65214,278,552,5871,627,553,0002,879,596,0002,408,448