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 12, 2026 15:53highload-churnerhighload-churnerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 12, 2026 15:530295,211,617285,090,0001,074,0002,113,536expected "1988837761 ", got "f=fgadggfmmgggjohgg5gdfggihrkrggggghxjgfeiifggfciidfkkgdgghomgledk r=00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff "
2Oct 12, 2026 15:530297,470,667287,375,0001,035,0002,113,536expected "1952148076 ", got "f=egofpjhffnwfgghhgggeegffrfhfffffkeejhthgifggggiaij7ferfmjfffffff r=00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff "
3Oct 12, 2026 15:530294,725,212284,761,0001,038,0002,113,536expected "2196501022 ", got "f=hifhhheihjshhhhhmhbgcshhk3fhhheikjhhhmhmmggljhcbmhh5fh7hhjihhchf r=00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff "