CT30724

The Firefly Mere Busy Hall

MediumL4 · Loop LordAcceptance: 0.0%XP: 35

The harbor bell rings at the lantern lake of Firefly Mere; Peddler weighs the day's scrolls manifests and starts the calculations. 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 <= 2161; 0 <= s < e <= 10^9.

Example 1:

Input: 495 899606605 899606688 575352966 575353011 82532382 82532408 130672310 130672371 323876870 323876892 181716517 181716561 315848018 315848033 577319455 577319497 415174376 415174420 379381685 379381755 708219025 708219097 917834986 917835066 440934788 440934790 549894765 549894793 452542158 452542193 123339197 123339230 996620666 996620731 61652381 61652419 880644275 880644326 726839065 726839161 696960175 696960177 941471227 941471319 592966511 592966512 475902198 475902264 526889719 526889786 644151956 644151967 694353583 694353639 127541648 127541687 544246568 544246595 74879608 74879665 843318227 843318259 678757117 678757131 477215337 477215435 253188816 253188818 584062306 584062391 472846290 472846295 159759260 159759296 364818780 364818840 690128 690175 56353274 56353341 782831601 …
Output: 1

Example 2:

Input: 1249 529647933 529647963 956949171 956949193 301781549 301781613 434544550 434544610 809378550 809378595 42729405 42729412 877579267 877579336 463394649 463394713 869249006 869249057 551315519 551315582 455124869 455124885 276286255 276286304 457534636 457534654 645106834 645106873 257832313 257832315 946899612 946899678 42396760 42396767 81592058 81592059 132779711 132779721 28555706 28555743 340768518 340768519 894407440 894407535 182025266 182025343 468618436 468618508 568171800 568171863 79923420 79923478 190792427 190792497 789411505 789411528 600212758 600212835 994421006 994421096 85062773 85062872 787477300 787477388 730260256 730260271 80225688 80225707 570326726 570326731 656456845 656456849 25560146 25560192 988323953 988324052 180938206 180938268 281843447 281843499 758014243 7…
Output: 1

Example 3:

Input: 1292 923903760 923903773 236555025 236555059 900647998 900648082 637649582 637649628 856356000 856356003 714822438 714822455 372584349 372584416 691216622 691216645 842573335 842573429 918934037 918934059 770758957 770759036 636686893 636686930 746889507 746889607 949475050 949475149 385231441 385231521 753983651 753983678 823974906 823974930 759555619 759555637 313126682 313126749 981652993 981653060 202813528 202813540 955782861 955782891 195646290 195646349 224177189 224177237 13514534 13514548 177831332 177831363 190018122 190018129 673863278 673863279 769465132 769465171 545603188 545603228 545306865 545306898 634987174 634987226 215175274 215175321 861779038 861779116 507748873 507748924 688145303 688145349 940637887 940637974 518426585 518426669 680859502 680859518 783313626 7833136…
Output: 1

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Firefly Mere Busy Hall - MEDIUM Coding Problem | CodeTikki