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 3, 2026 00:16Karthik 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 3, 2026 00:160758,665,790743,281,0004,805,00020,480expected "2153655647 ", got "U49 z-0.6 0 999 p...pi.hn.nmo.i....n.rl...k.w..tm..pllv.d..l..hl......lnfgp.q.bm...uphtg...klxp..s.h.r....m.mlnnme.. mjhrnmnnemembaelqooccmbocifteexncjrdsnbbfuhomnhnmhv "
2Oct 3, 2026 00:160793,727,980775,986,0006,546,00020,480expected "2290667529 ", got "U47 z3.3 0 999 ou.n.muqk...pfno.lr.fm.....mnxrmj.n...nlmosho...pm...n..ro.kn..n..to.....nnjm.n...n..l..nr.s...jhmt. jdnntdkkanckkulnmbanmmnlmohfhinnfmhmngbnopminngcddqja "
3Oct 3, 2026 00:160796,034,380779,041,0006,282,0002,113,536expected "2036659533 ", got "U46 z1.3 0 999 .jmjn..m.m..r.ql..enk.m..om..n.m..on.evft.ieo...n.eie...ci...m.e.n.qrtn.wmm.u....fn...oslv.cn...ih.o hnmnmnfbmbnammoomokdffeaekmccedfmcnhcanunmfimicnccouco "