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 listApr 3, 2023 21:52Franek KortaFranek KortaScore: 72,149Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 3, 2023 21:5071,40055,669,59524,386,0002,032,0002,527,232
2Apr 3, 2023 21:5071,54347,600,23626,471,00002,445,312
3Apr 3, 2023 21:5371,74956,635,33324,505,0002,042,0002,265,088
4Apr 3, 2023 21:5371,76850,597,51726,554,00002,445,312
5Apr 3, 2023 21:5271,80849,154,12526,569,00002,531,328
6Apr 3, 2023 21:5071,88148,866,44323,528,0003,068,0002,527,232
7Apr 3, 2023 21:5371,88158,378,49025,574,0001,022,0002,269,184
8Apr 3, 2023 21:5071,92453,995,26826,612,00002,441,216
9Apr 3, 2023 21:5371,94350,655,48226,619,00002,531,328
10Apr 3, 2023 21:5271,94652,757,47425,597,0001,023,0002,441,216
11Apr 3, 2023 21:5271,96855,510,53225,604,0001,024,0002,437,120
12Apr 3, 2023 21:5271,99757,531,87826,639,00002,445,312
13Apr 3, 2023 21:5372,00050,704,63626,640,00002,531,328
14Apr 3, 2023 21:5072,00349,863,89626,641,00002,531,328
15Apr 3, 2023 21:5272,04350,096,22025,631,0001,025,0002,269,184
16Apr 3, 2023 21:5072,06257,074,79426,663,00002,441,216
17Apr 3, 2023 21:5372,11651,557,77225,657,0001,026,0002,531,328
18Apr 3, 2023 21:5072,11955,134,27026,684,00002,531,328
19Apr 3, 2023 21:5272,14956,596,33625,628,0001,067,0002,531,328
20Apr 3, 2023 21:5372,22454,113,15025,696,0001,027,0002,441,216
21Apr 3, 2023 21:5272,48952,763,02925,828,000993,0002,269,184
22Apr 3, 2023 21:5372,53864,600,19823,857,0002,982,0002,437,120
23Apr 3, 2023 21:5072,56856,612,18024,862,0001,988,0002,445,312
24Apr 3, 2023 21:5272,57051,921,63925,857,000994,0002,445,312
25Apr 3, 2023 21:5372,57653,097,46825,859,000994,0002,265,088
26Apr 3, 2023 21:5272,57848,924,99525,860,000994,0002,265,088
27Apr 3, 2023 21:5072,60557,331,26426,864,00002,269,184
28Apr 3, 2023 21:5075,17887,894,68027,815,82802,297,856
29Apr 3, 2023 21:5275,53790,827,49927,948,52202,293,760
30Apr 3, 2023 21:5276,16395,243,18428,180,49202,179,072
31Apr 3, 2023 21:5376,16988,845,60428,182,37702,293,760
32Apr 3, 2023 21:5076,24995,961,36628,211,97602,170,880
33Apr 3, 2023 21:5376,25596,402,69628,214,28702,289,664
34Apr 3, 2023 21:5076,27592,405,71928,221,68402,170,880
35Apr 3, 2023 21:5276,433102,055,62328,280,30502,301,952
36Apr 3, 2023 21:5376,839106,046,88328,430,49202,289,664