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 listSep 3, 2024 16:22AnSaAnSaScore: 140,003Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 3, 2024 16:2298,919835,839,365698,254,000112,879,0002,400,256
2Sep 3, 2024 16:22100,150850,126,030705,336,000115,891,0002,437,120
3Dec 13, 2024 16:24109,417919,561,753790,311,000106,906,0002,506,752
4Dec 13, 2024 16:24119,8081,010,617,129859,501,000122,928,0002,404,352
5Sep 3, 2024 16:22128,3371,076,572,499942,429,000109,933,0002,404,352
6Sep 3, 2024 16:22137,7821,155,028,7941,016,928,000112,881,0002,396,160
7Sep 3, 2024 16:22140,0031,173,052,2181,038,120,000109,906,0002,416,640
8Dec 13, 2024 16:24142,2621,190,552,2211,035,712,000130,837,0002,486,272
9Sep 3, 2024 16:22144,4661,213,819,4901,068,757,000115,865,0002,363,392
10Sep 3, 2024 16:22145,9451,221,424,4061,088,864,000107,887,0002,375,680
11Sep 3, 2024 16:22145,9471,222,994,3011,080,889,000115,880,0002,375,680
12Sep 3, 2024 16:22153,0261,286,435,6391,135,927,000118,887,0002,523,136