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 2, 2026 22:05Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 2, 2026 22:050273,509,437263,392,0001,049,0002,113,536expected "2177700949 ", got "4445533455544337991100045454444545541235577654555555669965555555002557874444599644445445554445300344776455555511245554554445545544444445775555544555555545445554521244555003775544555555545546885544432344455998773344444300455...
2Oct 2, 2026 22:050279,614,525269,608,0001,009,0002,113,536expected "2062746134 ", got "4444555445444003540025555544555554455554499744334556655556699755998663345544599644444455544444454455545665567755577555555555555433445554551019964455566444444544454444899443114445444444455554442235455444555542129974444544444...
3Oct 2, 2026 22:050276,470,142266,235,0001,044,0002,113,536expected "2166599914 ", got "9974400155444333334444554577101444349964444433002665445554554455444443335555577422113554445554444454443335532245300443003455555511344456996444489944688547995444555555555444444455455455444444444554400144898557885566655444555...