QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#407407 | #8125. Milano C.le | Physics212303 | 110 ✓ | 34ms | 6580kb | C++17 | 532b | 2024-05-08 17:28:32 | 2024-05-08 17:28:33 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int n,f=1; cin>>n;
vector<int> a(n),b(n),p(n),v;
for(auto &i:a)cin>>i,i=n-i;
for(auto &i:b)cin>>i,i--;
for(int i=0;i<n;i++)p[a[i]]=b[i];
reverse(p.begin(),p.end());
for(int i=0;i<n;i++){
if(v.empty()||p[i]>v.back())
v.emplace_back(p[i]),f=max(f,(int)v.size());
else{
int l=lower_bound(v.begin(),v.end(),p[i])-v.begin();
f=max(f,l+1),v[l]=p[i];
}
}
cout<<f<<endl;
return 0;
}
詳細信息
Subtask #1:
score: 21
Accepted
Test #1:
score: 21
Accepted
time: 1ms
memory: 3524kb
input:
10 9 6 10 5 4 3 8 1 2 7 1 10 5 6 8 9 3 7 4 2
output:
3
result:
ok single line: '3'
Test #2:
score: 21
Accepted
time: 0ms
memory: 3520kb
input:
10 3 4 10 8 7 9 1 6 5 2 7 5 6 2 10 8 4 1 9 3
output:
4
result:
ok single line: '4'
Test #3:
score: 21
Accepted
time: 0ms
memory: 3496kb
input:
10 7 10 6 9 5 2 4 8 3 1 5 4 10 6 8 7 1 3 2 9
output:
3
result:
ok single line: '3'
Test #4:
score: 21
Accepted
time: 0ms
memory: 3552kb
input:
10 4 6 7 1 2 10 5 3 9 8 4 7 2 3 10 6 9 1 8 5
output:
4
result:
ok single line: '4'
Test #5:
score: 21
Accepted
time: 0ms
memory: 3548kb
input:
10 10 8 3 7 9 1 4 5 6 2 2 6 4 10 8 9 3 5 1 7
output:
4
result:
ok single line: '4'
Test #6:
score: 21
Accepted
time: 0ms
memory: 3772kb
input:
10 3 8 7 2 1 4 10 6 9 5 3 2 10 1 5 4 9 8 6 7
output:
6
result:
ok single line: '6'
Subtask #2:
score: 18
Accepted
Test #7:
score: 18
Accepted
time: 26ms
memory: 5404kb
input:
200000 49811 35437 78210 76840 39368 101812 62807 84210 125303 53862 81556 111413 46520 291 162773 152307 19434 180652 146115 177685 54028 186659 20283 176931 60644 75043 20240 16837 172424 83583 77248 81413 14772 58635 77647 115582 180735 103637 170193 126997 7840 70633 66980 53208 48772 165100 442...
output:
1
result:
ok single line: '1'
Test #8:
score: 18
Accepted
time: 18ms
memory: 5536kb
input:
200000 145909 86547 62291 63924 66511 147659 56041 446 32718 28551 89038 41790 118524 148268 83518 186850 3489 51329 108665 77128 164237 102455 37312 19433 139752 128031 43513 50451 41740 9638 61679 175128 123432 22782 185704 32097 108243 120319 37382 31750 110752 152533 78459 196530 90782 56119 179...
output:
1
result:
ok single line: '1'
Test #9:
score: 18
Accepted
time: 22ms
memory: 5412kb
input:
200000 111302 58913 29119 198556 178185 75661 137279 134379 168771 162624 55875 174264 24893 124163 14948 111231 32584 37199 179932 165308 53444 85518 133811 117435 43528 72754 196282 163274 141865 125176 134685 169954 36309 76895 98436 26815 165751 50389 197575 104685 56 45650 90870 43168 34708 879...
output:
1
result:
ok single line: '1'
Test #10:
score: 18
Accepted
time: 26ms
memory: 5540kb
input:
200000 23582 58537 99553 61847 88705 98358 7339 48732 49261 125302 9315 26365 104657 89268 152206 166303 90447 22484 24007 184531 5867 138330 131852 69833 108279 187656 33782 154017 126034 49918 190182 147788 49012 88696 89904 132848 6570 145862 139664 92993 153747 89174 62908 78917 169176 69552 159...
output:
1
result:
ok single line: '1'
Test #11:
score: 18
Accepted
time: 27ms
memory: 5464kb
input:
200000 63657 86634 19102 166454 135985 160996 175420 186837 160338 44021 44998 180483 188320 147761 131380 88426 90457 189046 46944 93522 81703 191351 18094 124598 154628 130778 72394 171549 121153 43445 39166 9468 197871 42215 156989 33667 194863 97684 79572 166301 27795 186905 145081 167539 167165...
output:
2
result:
ok single line: '2'
Test #12:
score: 18
Accepted
time: 26ms
memory: 5480kb
input:
200000 144288 92429 180671 32085 97122 33506 181164 182629 44675 168917 149458 115560 175864 23455 82713 153054 144919 79784 77713 124619 90793 196057 180774 148649 55522 29190 28441 114656 52758 128886 51312 97917 144306 32032 53360 118561 15250 72130 190865 190570 80060 86451 31274 27295 167248 55...
output:
2
result:
ok single line: '2'
Test #13:
score: 18
Accepted
time: 26ms
memory: 5476kb
input:
200000 176009 53797 95870 183035 170205 126086 142507 111715 288 173603 175732 76346 197117 65365 181307 184947 2350 124146 181483 145284 477 6350 94787 168989 123557 120079 50844 162948 106585 152638 116645 98231 65809 173027 23693 115573 25922 158720 9354 151555 70590 110284 100132 46104 135564 13...
output:
2
result:
ok single line: '2'
Test #14:
score: 18
Accepted
time: 22ms
memory: 5544kb
input:
200000 179626 12981 23096 81423 155179 377 135055 163979 89108 9188 137411 50070 136235 163141 14287 117432 162060 186518 197999 50779 13549 55136 55758 81600 161671 83219 105583 145777 35549 56270 57796 50368 63472 42765 34744 74323 33633 142836 38914 111764 192803 113868 127327 171134 175732 19712...
output:
2
result:
ok single line: '2'
Subtask #3:
score: 31
Accepted
Test #15:
score: 31
Accepted
time: 1ms
memory: 3548kb
input:
1000 580 679 467 625 347 579 234 750 873 328 83 348 797 199 30 958 773 586 993 755 852 482 969 840 504 655 884 872 812 435 814 207 791 715 132 637 628 427 564 314 372 66 871 78 163 915 678 134 96 379 853 450 656 286 97 842 447 662 170 156 305 275 654 329 105 216 717 779 523 739 499 311 896 778 462 4...
output:
56
result:
ok single line: '56'
Test #16:
score: 31
Accepted
time: 1ms
memory: 3596kb
input:
1000 118 527 541 426 219 738 880 146 978 177 150 970 637 534 139 237 382 624 750 827 127 834 983 326 545 81 913 675 603 565 477 501 777 33 12 120 45 90 694 74 890 374 585 281 475 179 96 222 537 228 849 462 202 286 358 246 297 299 1 932 172 872 167 306 291 349 269 173 277 799 48 879 616 592 968 439 9...
output:
63
result:
ok single line: '63'
Test #17:
score: 31
Accepted
time: 1ms
memory: 3504kb
input:
1000 996 252 960 196 537 260 512 574 651 514 592 198 234 893 106 518 321 139 699 961 246 779 151 796 354 786 802 131 875 953 328 793 359 480 236 215 278 895 782 533 861 338 946 3 65 920 719 47 153 148 816 820 419 111 936 209 240 159 193 206 302 597 203 817 999 985 484 545 155 903 698 986 481 840 911...
output:
59
result:
ok single line: '59'
Test #18:
score: 31
Accepted
time: 1ms
memory: 3764kb
input:
1000 352 796 900 656 407 226 271 510 757 486 86 618 293 98 243 217 126 441 868 608 18 493 313 661 349 712 921 132 838 466 318 141 610 484 664 64 554 241 972 614 816 9 276 514 833 24 467 138 793 542 723 436 304 359 347 592 810 686 49 931 488 28 390 630 83 184 181 265 225 962 3 340 30 248 42 245 953 5...
output:
63
result:
ok single line: '63'
Test #19:
score: 31
Accepted
time: 1ms
memory: 3540kb
input:
1000 247 667 657 263 766 32 176 723 448 343 698 973 267 731 166 958 48 142 748 21 229 628 45 932 423 773 456 716 325 387 174 285 254 309 605 597 62 439 673 300 618 373 79 23 89 127 15 486 398 392 739 334 566 581 137 124 977 275 850 327 734 391 915 980 465 783 730 877 993 815 905 201 672 97 160 320 4...
output:
58
result:
ok single line: '58'
Test #20:
score: 31
Accepted
time: 0ms
memory: 3784kb
input:
1000 929 857 989 664 867 325 231 679 353 18 442 935 215 54 249 368 113 574 730 494 336 562 235 273 721 514 221 432 201 675 257 898 772 309 121 175 56 186 475 393 687 31 682 928 400 263 900 773 960 415 401 707 141 786 868 351 910 777 464 9 352 443 660 889 906 465 90 975 148 268 990 991 847 919 948 92...
output:
3
result:
ok single line: '3'
Test #21:
score: 31
Accepted
time: 1ms
memory: 3556kb
input:
1000 890 50 404 108 471 332 870 385 353 766 495 488 10 611 463 96 744 775 742 783 929 760 320 487 648 978 871 803 450 722 893 467 906 838 589 815 197 732 792 239 950 125 274 616 124 32 276 42 832 828 430 295 638 205 649 67 810 380 552 271 575 788 181 988 245 330 407 782 228 151 610 933 418 762 753 2...
output:
998
result:
ok single line: '998'
Test #22:
score: 31
Accepted
time: 1ms
memory: 3564kb
input:
1000 207 480 527 712 428 579 317 196 445 673 223 325 720 685 34 315 119 657 72 132 114 860 373 849 890 929 678 537 534 757 732 767 371 200 130 165 512 361 741 149 723 679 221 448 932 902 12 843 735 238 635 277 881 607 911 704 5 472 776 628 844 337 715 397 724 254 109 387 839 818 473 143 967 782 819 ...
output:
3
result:
ok single line: '3'
Test #23:
score: 31
Accepted
time: 0ms
memory: 3792kb
input:
1000 523 345 813 275 169 475 28 605 318 51 196 122 37 173 588 119 422 433 817 280 847 842 876 763 860 221 979 537 192 969 450 141 584 862 783 409 39 738 623 249 866 619 191 725 560 497 811 259 208 616 636 760 741 712 745 868 226 977 990 80 310 464 469 884 156 723 424 906 421 468 8 114 14 124 276 544...
output:
998
result:
ok single line: '998'
Test #24:
score: 31
Accepted
time: 1ms
memory: 3604kb
input:
1000 789 262 854 523 181 702 651 775 187 850 417 759 686 796 879 319 336 309 952 594 621 672 150 450 713 468 782 160 273 209 945 49 588 813 102 408 254 711 19 406 57 701 220 885 991 6 662 348 643 177 852 608 369 418 27 501 330 901 116 245 792 385 843 645 734 990 279 161 407 329 837 683 84 372 125 47...
output:
3
result:
ok single line: '3'
Test #25:
score: 31
Accepted
time: 1ms
memory: 3592kb
input:
1000 603 614 102 797 656 575 367 148 320 533 299 572 606 810 638 69 382 88 829 521 710 445 709 421 792 800 778 390 862 690 14 470 622 272 44 691 502 241 305 93 699 814 968 786 352 28 329 567 922 439 410 982 923 184 397 370 841 331 491 12 978 392 604 672 202 32 915 593 313 373 987 95 197 482 83 115 4...
output:
998
result:
ok single line: '998'
Test #26:
score: 31
Accepted
time: 1ms
memory: 3544kb
input:
1000 478 959 205 290 29 543 496 528 280 30 328 593 518 941 94 196 936 860 704 920 239 804 519 618 293 741 330 563 487 770 548 259 918 833 734 240 79 812 410 725 114 891 428 284 751 832 906 103 569 365 773 780 701 174 400 401 100 267 125 504 864 915 993 420 75 996 378 295 503 907 148 913 34 828 130 9...
output:
3
result:
ok single line: '3'
Subtask #4:
score: 40
Accepted
Test #27:
score: 40
Accepted
time: 34ms
memory: 5408kb
input:
200000 3237 194597 67873 93719 52168 21301 105016 65594 173739 134696 81736 136518 150289 146197 45998 145247 87922 102322 134191 85575 8979 20675 54 130036 95597 4636 178711 79881 72413 7513 93983 10846 196676 9705 54959 164394 67779 19267 91322 181661 140597 9042 76594 125417 95751 98782 73813 144...
output:
878
result:
ok single line: '878'
Test #28:
score: 40
Accepted
time: 30ms
memory: 5408kb
input:
200000 193645 163318 113561 63624 117051 82464 198816 15860 64262 193817 44715 78803 81710 144980 6109 4410 156152 88487 197347 49676 47150 36012 72019 134312 175849 20826 17842 170765 39019 87371 148111 168 113694 110955 73145 154325 24221 189044 139593 71422 193074 138252 177341 185851 38329 15843...
output:
879
result:
ok single line: '879'
Test #29:
score: 40
Accepted
time: 34ms
memory: 5408kb
input:
200000 135470 70675 14941 53895 82235 87438 171391 62913 124383 163118 144751 13486 60158 59663 164225 11736 153315 116571 190808 41620 75582 20405 117918 8464 11959 133443 5932 35343 177388 151565 81977 70013 175586 3398 111801 91472 31014 172666 143979 67167 87597 174460 83666 106448 187811 64073 ...
output:
879
result:
ok single line: '879'
Test #30:
score: 40
Accepted
time: 29ms
memory: 5516kb
input:
200000 84102 53886 41603 155074 199335 165146 32781 149337 41097 65638 196921 47540 99454 82700 199593 157687 119892 19264 147617 24979 116483 15555 127017 66276 49442 165617 182310 45822 28740 70956 21578 156275 80886 160569 72751 123755 183067 108512 46915 158463 119260 115991 199896 190918 129258...
output:
888
result:
ok single line: '888'
Test #31:
score: 40
Accepted
time: 30ms
memory: 5408kb
input:
200000 11524 195586 105168 66947 93779 29286 19242 38371 93716 123837 96211 140885 144690 193054 47681 172468 78031 117109 153427 85194 14435 116825 119160 145367 100812 169045 21466 193855 12419 11206 132411 110139 106674 86189 32206 147915 95511 71160 75605 17705 111202 112366 20127 79317 109730 1...
output:
879
result:
ok single line: '879'
Test #32:
score: 40
Accepted
time: 30ms
memory: 5520kb
input:
200000 31225 199962 78509 153192 143644 117497 173077 72751 78116 101491 171532 116083 13967 165494 170592 196137 46607 163161 31577 56294 55612 139673 132161 172063 142537 3632 179274 78700 25718 95092 43038 12188 136435 43315 50965 139722 46505 100020 168348 48361 29850 11125 31466 726 38016 60955...
output:
887
result:
ok single line: '887'
Test #33:
score: 40
Accepted
time: 30ms
memory: 5460kb
input:
200000 28551 2611 117553 36944 98868 190620 10343 132221 19887 133255 196097 59663 13353 46030 186702 34391 116894 20088 195482 34459 60489 91752 116216 100998 111241 189905 163063 172344 113673 162715 102235 551 93374 135835 197422 43650 193772 191679 132089 199525 127736 11890 22743 114961 60651 1...
output:
885
result:
ok single line: '885'
Test #34:
score: 40
Accepted
time: 34ms
memory: 5460kb
input:
200000 27515 38725 133389 147412 17059 67112 118169 33339 84594 93655 61252 129268 45851 163672 34117 111913 171992 149709 99450 105906 61884 187295 27219 32565 149800 122634 693 117579 87814 146506 116460 114530 87736 155020 46844 142996 187696 131513 150031 35672 41019 188285 70752 103234 130930 1...
output:
879
result:
ok single line: '879'
Test #35:
score: 40
Accepted
time: 30ms
memory: 5404kb
input:
200000 76322 7725 82182 81325 51748 141593 7519 149435 36612 105357 146843 5826 36555 74352 128605 148920 165801 36013 53453 93440 97111 153743 110050 119957 106866 149132 183354 51904 63395 121696 111194 103340 116806 164545 157628 123524 16726 100632 23115 74676 14105 131481 171775 166053 80740 15...
output:
891
result:
ok single line: '891'
Test #36:
score: 40
Accepted
time: 34ms
memory: 5464kb
input:
200000 21138 119831 166349 152063 104205 67876 148008 31648 117654 149274 40836 87009 109469 40528 53748 116516 90022 101090 173462 14458 112856 33333 47692 66892 189626 177262 149530 177223 109531 28470 197154 117059 140904 34941 4544 24286 164013 29013 108252 169652 13757 21685 14909 52464 35847 4...
output:
876
result:
ok single line: '876'
Test #37:
score: 40
Accepted
time: 26ms
memory: 6536kb
input:
200000 14962 183527 80775 161359 116010 95820 35734 103446 87815 14040 40157 29581 159601 40140 82640 182370 78116 43444 134068 176956 33572 86134 180990 17289 22755 66747 183708 73909 142631 173942 38492 189653 26631 12751 164051 14698 40804 151945 123712 2353 90057 13650 24510 9749 49136 186862 66...
output:
199695
result:
ok single line: '199695'
Test #38:
score: 40
Accepted
time: 22ms
memory: 5544kb
input:
200000 180839 161936 40496 13891 72032 97414 133138 44897 51461 173510 6726 127860 118599 6935 76086 5792 93659 70975 28534 104920 43591 22033 34181 143994 83915 47785 162804 37292 179810 9341 11756 180518 16541 154842 134990 65174 198792 181480 42551 61861 171270 40324 43796 8802 130505 194289 1194...
output:
33
result:
ok single line: '33'
Test #39:
score: 40
Accepted
time: 18ms
memory: 6580kb
input:
200000 197081 110742 134330 13899 104190 27907 114627 125884 184725 50715 55068 136 150297 116921 11938 161509 42908 123186 195977 188181 74627 95774 25047 37206 71160 3780 122205 142319 4099 45657 198232 82884 37626 175406 54316 180691 109124 35736 179002 68310 155481 197833 68368 30125 65086 19547...
output:
199752
result:
ok single line: '199752'
Test #40:
score: 40
Accepted
time: 26ms
memory: 5444kb
input:
200000 81169 56774 105503 190056 185415 156034 72056 69966 144405 55920 150141 25714 56646 190730 166512 139709 185546 138756 187222 63957 113053 27120 65656 81209 141328 119203 31206 192042 70361 68317 184070 42782 69522 154377 172541 155238 61576 176476 25842 133996 10608 49521 95854 109048 90750 ...
output:
43
result:
ok single line: '43'
Test #41:
score: 40
Accepted
time: 26ms
memory: 6464kb
input:
200000 35608 9106 104084 173848 65087 32618 90901 102602 63574 180916 152332 103087 96301 186599 122985 86840 62413 138127 17523 123565 132707 84682 22889 160130 146861 30251 155224 41730 149430 30038 145057 74435 20695 37095 55639 65469 126881 48888 67174 196240 168854 152415 33783 176600 161144 18...
output:
199754
result:
ok single line: '199754'
Test #42:
score: 40
Accepted
time: 23ms
memory: 5460kb
input:
200000 85018 167747 53067 153174 184654 146910 88753 165737 4689 184442 83429 53236 61637 81334 6462 2623 133169 30577 44274 172010 73055 189388 35285 46373 196047 159499 164529 185203 47408 1474 143071 183295 25029 29962 33961 158216 190047 18980 86144 102219 111170 18732 164471 132628 102989 17475...
output:
31
result:
ok single line: '31'
Extra Test:
score: 0
Extra Test Passed