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 listNov 10, 2024 07:45Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 10, 2024 08:0600000Error: Exit with code 1: Index out of boundsstderr
2Nov 10, 2024 07:4400000Error: Exit with code 1: Index out of boundsstderr
3Nov 10, 2024 07:4600000Error: expected "2037698847 ", got "2037698856 "
4Nov 10, 2024 07:5100000Error: Exit with code 1: Index out of boundsstderr
5Nov 10, 2024 07:5200000Error: Exit with code 1: Index out of boundsstderr
6Nov 10, 2024 07:5700000Error: expected "2158799463 ", got "2158799507 "
7Nov 10, 2024 07:5800000Error: Exit with code 1: Index out of boundsstderr
8Nov 10, 2024 08:0000000Error: Exit with code 1: Index out of boundsstderr
9Nov 10, 2024 08:0100000Error: expected "2103487411 ", got "2103487517 "
10Nov 10, 2024 08:0200000Error: Exit with code 1: Index out of boundsstderr
11Nov 10, 2024 08:0300000Error: Exit with code 1: Index out of boundsstderr
12Nov 10, 2024 08:0400000Error: Exit with code 1: Index out of boundsstderr
13Nov 10, 2024 08:0500000Error: Exit with code 1: Index out of boundsstderr
14Nov 10, 2024 08:0500000Error: Exit with code 1: Index out of boundsstderr
15Nov 10, 2024 08:0720,647195,695,653155,284,00014,025,0002,301,952
16Nov 10, 2024 07:5922,047209,607,774154,820,00025,969,0002,445,312
17Nov 10, 2024 08:0722,353212,616,091163,260,00020,031,0002,433,024
18Nov 10, 2024 07:5923,359220,505,279176,500,00015,042,0002,428,928
19Nov 10, 2024 07:5923,757220,060,435174,825,00019,980,0002,478,080
20Nov 10, 2024 07:5923,807224,988,186172,192,00023,025,0002,371,584
21Nov 10, 2024 07:5923,813220,421,128176,241,00019,026,0002,383,872
22Nov 10, 2024 08:0724,597229,593,228180,731,00020,968,0002,494,464
23Nov 10, 2024 07:5925,125236,805,071185,019,00021,002,0002,445,312
24Nov 10, 2024 07:5925,456233,404,330193,755,00014,981,0002,338,816
25Nov 10, 2024 07:5925,813244,020,896188,703,00022,963,0002,285,568
26Nov 10, 2024 07:5926,109238,069,442197,090,00017,007,0002,306,048
27Nov 10, 2024 07:5326,306242,200,723197,736,00017,976,0002,420,736
28Nov 10, 2024 07:5326,310245,394,787197,679,00018,062,0002,318,336
29Nov 10, 2024 07:5326,723244,334,154198,119,00021,012,0002,273,280
30Nov 10, 2024 07:5327,611259,981,946206,377,00020,036,0002,428,928
31Nov 10, 2024 07:5328,013256,278,008209,731,00019,974,0002,478,080
32Nov 10, 2024 07:5328,040263,281,526211,932,00017,994,0002,314,240
33Nov 10, 2024 07:5328,105256,018,344213,431,00017,034,0002,498,560
34Nov 10, 2024 07:5328,677261,752,747210,138,00025,016,0002,416,640
35Nov 10, 2024 07:5328,718261,007,849217,453,00018,037,0002,498,560
36Nov 10, 2024 07:4932,031292,932,117226,701,00035,952,0002,478,080
37Nov 10, 2024 07:4932,694295,293,395236,083,00032,011,0002,342,912
38Nov 10, 2024 07:4934,244313,438,371252,822,00027,980,0002,392,064
39Nov 10, 2024 07:4935,291314,495,351257,341,00032,042,0002,334,720
40Nov 10, 2024 07:4935,837317,735,832262,876,00030,985,0002,531,328
41Nov 10, 2024 07:4935,972324,825,080255,972,00038,995,0002,285,568
42Nov 10, 2024 07:4936,256333,589,592265,269,00032,032,0002,269,184
43Nov 10, 2024 07:4936,573329,317,421260,910,00038,986,0002,285,568
44Nov 10, 2024 07:4936,642329,979,059269,415,00031,047,0002,363,392
45Nov 10, 2024 07:4537,558331,762,126268,980,00038,997,0002,277,376
46Nov 10, 2024 07:4738,046340,446,950274,980,00036,997,0002,445,312
47Nov 10, 2024 07:4539,842360,261,431291,736,00034,968,0002,306,048
48Nov 10, 2024 07:4739,912355,180,136289,247,00038,032,0002,404,352
49Nov 10, 2024 07:4740,045359,083,194287,325,00041,046,0002,383,872
50Nov 10, 2024 07:4740,174357,507,126295,382,00034,044,0002,510,848
51Nov 10, 2024 07:4740,218362,466,702287,817,00041,973,0002,420,736
52Nov 10, 2024 07:4541,300368,634,571296,700,00041,957,0002,285,568
53Nov 10, 2024 07:4741,535390,078,059304,630,00035,956,0002,281,472
54Nov 10, 2024 07:4741,547361,813,814299,725,00040,962,0002,375,680
55Nov 10, 2024 07:4742,446381,303,476313,155,00034,905,0002,527,232
56Nov 10, 2024 07:4742,976386,924,782309,355,00043,049,0002,363,392
57Nov 10, 2024 07:4543,039379,825,952312,932,00039,991,0002,310,144
58Nov 10, 2024 07:4543,817389,398,053324,271,00035,029,0002,318,336
59Nov 10, 2024 07:4543,977394,744,325323,653,00036,960,0002,400,256
60Nov 10, 2024 07:4544,998393,773,567321,989,00046,998,0002,400,256
61Nov 10, 2024 07:4545,221400,288,436338,832,00031,984,0002,285,568
62Nov 10, 2024 07:4550,005436,241,108371,041,00039,004,0002,310,144