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 2, 2026 22:04Karthik 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 22:040279,821,636269,692,0001,081,0002,113,536expected "2101057796 ", got " 617 424 502 510 638 396 468 520 416 556 513 506 508 507 675 431 436 540 551 485 483 521 367 622 433 534 497 513 584 494 485 521 521 501 555 483 569 474 458 532 500 511 386 557 498 513 664 427 469 527 629 439 650 446 434 54...
2Oct 2, 2026 22:040283,256,000273,144,0001,022,0002,113,536expected "2033616837 ", got " 598 467 544 497 624 471 477 533 477 523 462 531 635 445 529 496 487 520 504 509 487 518 448 562 403 541 537 453 560 520 543 493 649 428 523 481 621 393 509 507 487 518 640 400 499 512 350 599 514 505 530 497 487 518 479 52...
3Oct 2, 2026 22:040282,803,320272,789,0001,008,0002,113,536expected "2048465108 ", got " 444 541 596 427 552 485 500 511 452 526 558 475 486 519 653 421 626 410 457 523 441 552 573 458 493 514 520 501 504 509 613 461 374 630 902 242 498 512 571 471 500 507 355 588 481 522 401 563 498 512 450 537 443 531 468 50...