CT52577

Harper's Bronze Ledger

MediumL5 · Recursion RenegadeAcceptance: 0.0%XP: 60

It is audit day at the coastal hub of Tidewater. Harper spreads the panels records across the table and picks up a sharp pencil. Task: n crews each guard a half-open interval [s,e). An interval ending at time t does not overlap one starting at t. Print the maximum number overlapping at any instant. Input format: First line: n. Next n lines: s e. Output format: Print the maximum simultaneous overlap. Constraints: 1 <= n <= 1600; 0 <= s < e <= 10^9.

Example 1:

Input: 1177 669560735 669560747 733385754 733385766 591257715 591257726 88627662 88627690 109687073 109687159 526153208 526153297 314135002 314135057 128852019 128852051 834528468 834528507 171863003 171863042 15693418 15693465 753797185 753797203 7867717 7867752 607489706 607489799 639327222 639327259 614488487 614488531 229522204 229522279 473017691 473017727 644101625 644101706 368334187 368334220 789332873 789332927 726935913 726935924 409886249 409886254 962211226 962211310 380870864 380870891 55023471 55023537 880628947 880628998 185386810 185386878 524172640 524172663 367060851 367060944 470999179 470999267 12379621 12379623 64606344 64606429 117484028 117484073 642081682 642081690 641403457 641403512 853320334 853320337 950222979 950223018 431117200 431117247 674696006 674696027 212906670…
Output: 1

Example 2:

Input: 463 317508057 317508078 922964195 922964249 920428618 920428681 676696952 676696966 454535828 454535885 948229810 948229859 60449519 60449559 36441924 36441974 786863830 786863908 547124098 547124114 782390724 782390742 653404049 653404135 45910957 45910969 554308485 554308510 661876779 661876834 135748552 135748610 27542015 27542096 260565740 260565789 873366615 873366653 760268931 760269001 972857186 972857213 233344420 233344475 685788304 685788404 77238698 77238711 885138643 885138672 338868365 338868455 937054668 937054758 205670337 205670381 437814317 437814370 560158807 560158896 148611268 148611332 121327508 121327583 518778980 518779059 495453808 495453814 599248972 599248998 238573345 238573397 526103339 526103354 940573445 940573496 532240243 532240265 672219078 672219091 664720…
Output: 1

Example 3:

Input: 187 929043637 929043690 661154640 661154728 680153841 680153887 5104143 5104163 639542085 639542129 992345692 992345729 280204206 280204219 15758688 15758726 786934590 786934598 680748833 680748927 259848242 259848303 306838137 306838159 109249781 109249880 28783667 28783748 81658451 81658457 731240181 731240193 71145430 71145493 620480001 620480050 168806485 168806486 757879316 757879386 914487722 914487767 433583914 433584013 286338505 286338598 637436604 637436666 749356605 749356685 328048220 328048298 470132915 470132985 405849580 405849629 190614926 190615023 329840517 329840580 225495078 225495100 528859545 528859553 26957493 26957563 724105013 724105079 27778435 27778493 964194345 964194444 34681670 34681725 109097318 109097331 100043021 100043097 862104718 862104763 101189843 1011…
Output: 1

Constraints:

1 <= n <= 1600; 0 <= s < e <= 10^9.

Loading...
Test Cases:No test cases
No test cases available.