TopK Sergey Svistunov

Find the sum of the 100 largest values in 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 uint64 sum of the top 100 greatest values, printed as a decimal string.

Back to listOct 2, 2026 21:28Karthik 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 21:29012,041,6641,062,0002,126,0002,117,632expected "429496474217 ", got " A362/60 B170 Bu54 C1143 Cu54 D171 Du49 E163 Eu47 Au70 s0 0b,106c,190i, "
2Oct 2, 2026 21:29011,952,9651,593,0001,593,0002,117,632expected "429496538824 ", got " A347/46 B169 Bu54 C1139 Cu54 D170 Du50 E162 Eu44 Au67 s1 0b,190i, "
3Oct 2, 2026 21:29011,901,9111,585,0001,585,0002,117,632expected "429496487118 ", got " A346/46 B170 Bu52 C1133 Cu53 D170 Du50 E164 Eu45 Au66 s0 0b,190i, "