CT40318

The Busy Hall at Screech Point

MediumL5 · Recursion RenegadeAcceptance: 0.0%XP: 60

Deep in the gull cliffs of Screech Point, Navigator studies rows of scrolls entries. One clean number will settle the guild's oldest argument. 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 <= 1333; 0 <= s < e <= 10^9.

Example 1:

Input: 1094 234728552 234728563 914010984 914011074 164397579 164397621 950581291 950581292 668143124 668143156 429986724 429986770 702015429 702015442 434559106 434559138 436545658 436545740 110234647 110234738 931647080 931647178 752238787 752238821 973981777 973981870 469589234 469589290 945932919 945932964 580793857 580793952 477959188 477959234 631364819 631364865 264114342 264114368 876701710 876701717 36341763 36341765 774139235 774139242 321395475 321395506 264071581 264071606 602205294 602205337 153717279 153717298 858491416 858491461 379927197 379927205 782080377 782080393 877913395 877913448 355767723 355767742 292422299 292422364 977747759 977747765 189947234 189947326 134055490 134055498 377209660 377209755 867836721 867836743 712420347 712420365 671265034 671265120 140442905 1404429…
Output: 1

Example 2:

Input: 1213 410376249 410376346 125521536 125521542 219509227 219509237 505054270 505054334 418977086 418977172 564318467 564318545 35302501 35302580 904671415 904671432 237616198 237616249 239274356 239274380 936884079 936884136 411845691 411845728 504386962 504386988 383517513 383517587 702258493 702258509 622761655 622761708 136201916 136201955 305273785 305273851 86242288 86242327 739236845 739236877 704276599 704276669 391954719 391954811 67263792 67263877 351279774 351279802 167136139 167136235 318902664 318902709 636038390 636038480 174883288 174883315 510736035 510736085 829493862 829493927 80978196 80978222 348082262 348082341 290155298 290155315 818271758 818271759 407319834 407319860 184318424 184318467 63387519 63387565 833538639 833538644 933462053 933462062 388354881 388354902 25363…
Output: 1

Example 3:

Input: 973 795774119 795774190 328649344 328649430 489615466 489615485 398428087 398428158 73773534 73773630 894879713 894879759 121851089 121851150 72385242 72385280 190385744 190385768 747244839 747244869 480794080 480794176 240687877 240687891 457345952 457346030 475585385 475585397 484737277 484737377 12018298 12018383 727324411 727324499 181502385 181502401 3554755 3554790 459230297 459230318 608652529 608652587 761717146 761717226 527334018 527334053 488168110 488168176 732766576 732766612 416600286 416600332 224112396 224112399 70725509 70725574 8473721 8473761 404703279 404703309 669343544 669343610 193674297 193674372 572177773 572177867 802094577 802094601 766530564 766530613 445191588 445191641 109977872 109977940 897585499 897585536 622954216 622954313 58969880 58969950 139965649 1399…
Output: 1

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Busy Hall at Screech Point - MEDIUM Coding Problem | CodeTikki