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 listApr 9, 2025 05:22NoSIMD_C#NoSIMD_C#Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2025 05:2100000Error: expected "2200669363 ", got "2190433292 "
2Apr 9, 2025 05:2200000Error: expected "2241729369 ", got "2190433269 "
3Apr 9, 2025 05:22152,5871,275,302,5691,118,300,000132,916,0002,281,472
4Apr 9, 2025 05:22170,0021,421,820,7971,271,100,000122,913,0002,277,376
5Apr 9, 2025 05:22171,5801,436,267,5431,294,037,000112,916,0002,355,200
6Apr 9, 2025 05:22184,1501,537,355,3151,391,107,000118,923,0002,519,040
7Apr 9, 2025 05:22191,7811,604,161,8511,458,635,000113,971,0002,457,600
8Apr 9, 2025 05:22200,3051,670,226,0161,528,539,000113,965,0002,404,352
9Apr 9, 2025 05:22237,7921,975,039,3521,826,967,000122,930,0002,269,184
10Apr 9, 2025 05:22242,3022,015,293,8431,874,943,000111,936,0002,510,848
11Apr 9, 2025 05:22293,0002,428,848,4632,283,668,000118,930,0002,453,504