CT42750

Frosted panels Busy Hall

MediumL5 · Recursion RenegadeAcceptance: 0.0%XP: 60

The council of the honey farms of Buzzwell pays by the answer, and Amara intends to earn it. First: the full register of panels. 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 <= 1702; 0 <= s < e <= 10^9.

Example 1:

Input: 1123 786395523 786395524 780433603 780433684 65679887 65679913 159901692 159901715 272550240 272550303 411240315 411240375 929364864 929364937 809995726 809995733 894237005 894237100 461778320 461778325 460967265 460967358 616234439 616234533 200511430 200511456 656025005 656025065 218015161 218015206 811388222 811388276 743839646 743839672 862912097 862912121 3868507 3868532 793202692 793202720 275783160 275783215 977578267 977578358 272738270 272738286 420939938 420940016 740661760 740661809 362920527 362920612 255356778 255356851 396071220 396071286 160811852 160811948 285893987 285894068 211861204 211861238 217561888 217561917 677469399 677469495 399539577 399539592 631220202 631220290 446161711 446161789 764055544 764055597 650779681 650779753 168704789 168704799 297479723 297479726 5…
Output: 1

Example 2:

Input: 1509 482161348 482161383 953389938 953389990 750392457 750392531 186570761 186570799 614470199 614470201 780433479 780433500 606912270 606912326 874231920 874231933 838173252 838173294 201968748 201968755 188791193 188791204 846240441 846240506 632420952 632421037 9784598 9784684 519742936 519742977 492673360 492673454 983663186 983663279 913130978 913131054 748890943 748891023 894071555 894071623 636660907 636661003 165439255 165439342 959660389 959660448 527022502 527022554 38304407 38304448 541898396 541898446 400317514 400317599 591422942 591423027 75602783 75602856 941866667 941866699 286894448 286894494 446217198 446217226 350097796 350097849 420796832 420796862 960444125 960444142 325245839 325245886 130852317 130852390 113356085 113356090 526186295 526186317 216999010 216999106 643…
Output: 1

Example 3:

Input: 149 366831187 366831208 847253066 847253084 87288863 87288930 448268976 448269014 506860991 506860992 787909189 787909201 462642947 462642951 509711161 509711224 914779528 914779547 549090973 549090978 297510935 297510936 593709227 593709264 537557746 537557757 577657193 577657250 791603655 791603656 562833761 562833782 563577400 563577484 679970032 679970083 76488715 76488752 847152321 847152336 840932585 840932664 875105178 875105216 355909307 355909344 546948928 546949000 851880734 851880751 812295494 812295521 392495387 392495421 260785670 260785744 410838791 410838851 967521466 967521491 864860307 864860365 987310808 987310834 644743809 644743832 199177612 199177668 153503617 153503642 77834272 77834358 958177817 958177818 420445950 420445984 816091249 816091343 291149725 291149814 95…
Output: 1

Constraints:

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

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