QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#189903 | #1347. Universal and Existential Quantifiers | KKT89 | AC ✓ | 62ms | 10312kb | C++17 | 1.4kb | 2023-09-28 01:25:33 | 2023-09-28 01:25:34 |
Judging History
answer
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
inline double time() {
return static_cast<long double>(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count()) * 1e-9;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
ll L; cin >> L;
vector<pair<ll,ll>> v(n);
for (int i = 0; i < n; ++i) {
cin >> v[i].first >> v[i].second;
}
sort(v.begin(), v.end());
int r1 = 0;
{
ll cur = 0;
priority_queue<ll> pq;
for (int i = 0; cur < L;) {
while(i < n and v[i].first <= cur){
pq.push(v[i].second); i++;
}
ll p = pq.top(); pq.pop();
r1++;
cur = p;
}
}
int r2 = 0;
{
ll cur = 0;
priority_queue<ll,vector<ll>,greater<ll>> pq;
for (int i = 0; cur < L;) {
while(i < n and v[i].first <= cur){
pq.push(v[i].second); i++;
}
ll p = pq.top(); pq.pop();
r2++;
cur = max(cur, p);
if(cur == L) r2 += n-i;
}
}
cout << r1 << " " << r2 << endl;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3864kb
input:
3 3 0 2 1 3 1 2
output:
2 3
result:
ok 2 number(s): "2 3"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
2 4 0 4 0 4
output:
1 1
result:
ok 2 number(s): "1 1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
5 4 0 2 2 4 0 3 1 3 3 4
output:
2 4
result:
ok 2 number(s): "2 4"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
72 6951 1279 5415 5774 5967 352 2975 4106 6269 565 3393 4119 5218 3154 4517 1323 4249 5468 6430 4356 6171 6461 6777 5997 6190 2895 6933 2072 5554 975 2873 3436 5916 6078 6377 6068 6569 4419 4775 4637 6656 1821 6617 2430 4645 4251 5125 2873 6894 5102 5914 785 2327 2853 6333 6091 6302 1477 6365 2015 4...
output:
3 72
result:
ok 2 number(s): "3 72"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
25 6007 2636 5976 4846 4848 2011 2320 4483 5650 4590 5525 5686 5983 4438 6007 3487 5407 5611 6005 5904 6006 4288 5436 3408 4233 2315 4762 5576 5660 3988 5327 956 5992 3368 5103 4448 5975 4629 4827 4557 5921 3696 6001 0 5196 2127 5131 4719 5451 793 5151
output:
2 25
result:
ok 2 number(s): "2 25"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
71 5875 3245 4539 2453 2646 5139 5424 4735 5233 0 5852 1073 1109 3220 4838 482 1667 4111 5874 1738 5508 1555 1757 5081 5369 2527 5054 321 4402 5183 5720 4395 4855 2774 5256 668 3284 4346 4564 2436 2932 1694 4462 1514 4716 2067 2165 5146 5349 869 4216 4850 5150 2636 5091 171 4352 1550 1830 4731 5286 ...
output:
2 71
result:
ok 2 number(s): "2 71"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
72 3554 2007 2891 2321 3403 3423 3452 3513 3545 2651 2798 629 3542 3150 3310 2827 3181 550 3554 2884 3240 82 3553 1253 3467 66 1994 1871 2692 1730 2083 812 3547 863 1809 2622 2631 2883 3500 1543 2704 2225 3002 1057 2684 1562 3143 510 3532 1417 2880 3220 3337 2617 3222 2326 3092 2974 3124 509 3279 21...
output:
2 72
result:
ok 2 number(s): "2 72"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
12 2462 1212 2458 392 1970 710 1769 533 1677 1694 1742 2026 2462 0 1381 48 1400 1042 2460 1912 2330 293 2446 60 2293
output:
3 12
result:
ok 2 number(s): "3 12"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
11 8900 6913 8898 4203 8886 0 8147 5469 8883 7658 8900 8154 8876 3532 8701 4251 8869 7214 8843 8626 8899 3051 7676
output:
2 11
result:
ok 2 number(s): "2 11"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
54 8641 6433 7171 5844 5934 5405 7192 6544 6631 3012 5527 5374 6052 3439 6694 4120 4686 7324 8329 4422 8601 7053 8258 888 4474 972 1832 0 3047 3071 4758 5303 6898 7396 8394 5926 8602 3370 5206 1507 3332 7603 8141 3722 8387 4599 8637 292 5399 673 8640 2757 6991 68 1412 72 1074 4409 8210 4122 8039 161...
output:
3 54
result:
ok 2 number(s): "3 54"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
31 7482 1130 7210 4939 6328 0 66 28 89 1772 6450 3255 6386 1363 7482 5576 5931 1608 5509 4072 4513 1635 4691 5220 6904 5361 5915 5071 7474 5796 6472 1057 1989 20 1293 2983 5045 785 3917 4272 7470 2639 7473 2186 7468 1455 3299 373 1801 2715 6062 1972 5083 5290 6064 1288 1576 487 6403 4997 5897 3399 7...
output:
4 31
result:
ok 2 number(s): "4 31"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
28 4245 2269 4219 2856 4233 2548 4205 2111 4243 741 2578 1329 4072 683 1698 1891 4196 1483 2331 3900 4192 3508 3806 613 4185 1707 3159 2753 2871 159 4242 274 4099 4073 4221 1034 3444 2925 4202 3460 4103 0 1324 706 909 1 3535 1212 2696 3193 4006 23 2795 4000 4245 646 1821
output:
3 28
result:
ok 2 number(s): "3 28"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
19 7893 7205 7860 1081 4787 362 7778 3599 7892 7729 7730 5390 7773 2426 6594 2533 7893 2215 3878 6499 6516 0 2764 4026 7537 3343 5155 2188 6265 5912 7891 1186 7867 6187 7574 3020 4601 4025 6281
output:
2 19
result:
ok 2 number(s): "2 19"
Test #14:
score: 0
Accepted
time: 34ms
memory: 6000kb
input:
114343 999999779541 961721540565 976396960953 589941177726 866813045481 621153122593 897177242310 905375852958 980690474834 769887663789 993876779994 419220971814 575086803821 893226415014 977540565350 6316923158 888251545625 260132303809 670073868273 983608882908 986249588581 253618956906 312051265...
output:
3 114343
result:
ok 2 number(s): "3 114343"
Test #15:
score: 0
Accepted
time: 38ms
memory: 6032kb
input:
114696 999999248497 304084248466 394866293909 662209401853 826810816600 468842921373 883848636199 810536611764 883483160880 941855270718 984465500097 323876602159 752524035569 588016363851 745413226300 296945561679 932802537918 563404823459 836409553825 746182179600 887253382732 826471400903 9722708...
output:
3 114696
result:
ok 2 number(s): "3 114696"
Test #16:
score: 0
Accepted
time: 57ms
memory: 8200kb
input:
177836 999999870469 23534665826 489867815775 150000080390 988176630989 503276260048 829600836873 342576938472 373658942813 756704369085 966083515671 323311922882 752005192830 128586675089 661277198514 418993157840 598669211042 328288304246 577970651290 54237183482 809477168070 108531199507 751445421...
output:
3 177836
result:
ok 2 number(s): "3 177836"
Test #17:
score: 0
Accepted
time: 31ms
memory: 6884kb
input:
116188 999999161844 257334261947 292880632549 948789768188 999216207608 109948920728 746143652324 968081954176 984251936676 675355081783 859705677482 850426624682 911006445581 670821756401 830977975481 172879696478 476348601748 652946195584 761320548333 322371240027 405673331675 780743715314 8677547...
output:
3 116188
result:
ok 2 number(s): "3 116188"
Test #18:
score: 0
Accepted
time: 60ms
memory: 8040kb
input:
178705 999999614604 636586866727 705987923669 401913764451 660567007809 813783020379 861099118576 417181573786 593481515781 111466624195 601221303314 191006790702 520092271694 462385950631 999065119006 563502314585 613558290395 811372859453 971530236778 410523703829 771020221370 322821029234 8240313...
output:
3 178705
result:
ok 2 number(s): "3 178705"
Test #19:
score: 0
Accepted
time: 62ms
memory: 8152kb
input:
182323 999999477491 180321575960 222599363339 802117625127 823622213305 753679082691 774286562443 284784387906 541022286744 174958622782 562096595171 841963589382 991460662024 388661340109 974930839146 499464925799 508984713514 239827936858 476894966561 400100780368 629705811992 978907556773 9954113...
output:
3 182323
result:
ok 2 number(s): "3 182323"
Test #20:
score: 0
Accepted
time: 60ms
memory: 10148kb
input:
180898 999999014815 334450228466 503334784963 186830709333 693681893088 449404226182 784311456420 892646746348 940049353284 823917316374 919749528085 276319366247 947263894532 755922082752 874575510285 338067888164 367464529023 344022766233 904501703170 200314136804 628220987500 943403693445 9920364...
output:
2 180898
result:
ok 2 number(s): "2 180898"
Test #21:
score: 0
Accepted
time: 33ms
memory: 5988kb
input:
115971 999999514122 332911922913 398852633639 731886467352 805950656635 59059337874 704335692355 389411593433 522354279863 544753784841 790087545320 129918950919 342036960446 103322023911 803937872751 39649382365 963420168630 866233920562 905620006188 764993053035 849321238813 14992229330 7512668059...
output:
2 115971
result:
ok 2 number(s): "2 115971"
Test #22:
score: 0
Accepted
time: 61ms
memory: 8276kb
input:
192768 999999439479 498230628051 744382496510 304239236926 372870323833 18007344976 124743197690 54625426408 456773150988 994020333748 996903576609 311750073068 415542572176 449691032798 543681708454 320350305051 916273878215 901102038029 943525239638 258214446095 545695176133 236318045474 828226215...
output:
3 192768
result:
ok 2 number(s): "3 192768"
Test #23:
score: 0
Accepted
time: 28ms
memory: 5980kb
input:
108443 999999341365 53221339435 115446156985 300672764130 911228668020 531978250460 951983524623 829293539560 958020424223 341148564031 990108360152 951068864362 967399970839 806397854590 876385435586 952731384426 978808932850 949068864077 966859522406 220276075276 462299300428 264795813939 62286456...
output:
3 108443
result:
ok 2 number(s): "3 108443"
Test #24:
score: 0
Accepted
time: 27ms
memory: 5204kb
input:
123433 999999525048 126556719391 126565129743 586559992553 586560132976 158776656302 158777039337 472050869628 472055474984 64909968259 64916587400 916013990424 916021575164 482434589957 482447641384 901037441429 901050684363 812327939644 812348537548 308417205894 308428916143 620025267250 620025675...
output:
123433 123433
result:
ok 2 number(s): "123433 123433"
Test #25:
score: 0
Accepted
time: 25ms
memory: 5300kb
input:
133322 999999942139 44035860514 44050764417 646721153264 646728497889 135210336630 135246229851 388351600870 388356484866 660488389448 660494788270 216432940173 216443218549 461760936461 461762880878 645717678002 645719010092 514450078213 514451638333 795358855767 795372187091 874155341937 874157093...
output:
133322 133322
result:
ok 2 number(s): "133322 133322"
Test #26:
score: 0
Accepted
time: 40ms
memory: 5992kb
input:
184849 999999351144 431984304061 431984660839 250205459053 250205995164 964701611400 964711353284 382635327184 382652022204 784601952941 784604010827 831957256262 831957745519 457303083998 457314885171 472792171311 472802499924 553935869687 553937598677 274241008975 274242501694 404376973514 4043798...
output:
184849 184849
result:
ok 2 number(s): "184849 184849"
Test #27:
score: 0
Accepted
time: 25ms
memory: 5156kb
input:
133305 999999150833 277808551083 277808858774 548031618768 548037194721 339904394375 339906740225 206720306585 206729032833 45966250012 45968107374 951822054848 951829854396 652389450804 652393731772 980135722170 980138177585 675273675610 675284282513 741300463305 741309732503 938792962678 938793446...
output:
133305 133305
result:
ok 2 number(s): "133305 133305"
Test #28:
score: 0
Accepted
time: 20ms
memory: 5160kb
input:
125262 999999739261 527111546180 527140713840 446544124871 446545528054 37279102188 37281436408 173945510417 173946752953 587736219916 587740453998 363029765836 363041622283 959539838167 959543498684 68568747430 68578202566 837209751581 837210056566 248114346560 248129395046 831341096848 83135980816...
output:
125262 125262
result:
ok 2 number(s): "125262 125262"
Test #29:
score: 0
Accepted
time: 22ms
memory: 5036kb
input:
117036 999999207073 924898681342 924907280420 495168851503 495178535102 513244564026 513248946276 38797086309 38802495810 923257599624 923264249406 305315490421 305320461637 207246082431 207255819063 159625431783 159627657199 415272859663 415293560748 148795979069 148806928202 538688364118 538692413...
output:
117036 117036
result:
ok 2 number(s): "117036 117036"
Test #30:
score: 0
Accepted
time: 27ms
memory: 5256kb
input:
122772 999999619576 225695262376 225695383570 61720072372 61744130552 545469982599 545478997918 219411405482 219417424068 308399383732 308412854574 495409437309 495420146158 431287799207 431316361371 813528102588 813539059136 225519881360 225520992615 67807731180 67814500306 741549391761 74155861410...
output:
122772 122772
result:
ok 2 number(s): "122772 122772"
Test #31:
score: 0
Accepted
time: 38ms
memory: 5924kb
input:
176214 999999223579 158281525277 158283764698 336300196500 336314598715 158492961550 158514222617 937993800383 937998656728 91246633079 91247970218 809482574504 809492505553 528413829136 528425052353 734903390031 734906817200 14961847644 14962583055 720201793136 720202280599 540744914411 54074504669...
output:
176214 176214
result:
ok 2 number(s): "176214 176214"
Test #32:
score: 0
Accepted
time: 34ms
memory: 5700kb
input:
154454 999999726350 775213251453 775215208424 98845129269 98855562609 918315624821 918319316286 489780512835 489783549205 354733859624 354737416640 546367054415 546374141930 351552308836 351567969191 855179664309 855182489357 241678477201 241688153307 664653034396 664653186752 326030408645 326050128...
output:
154454 154454
result:
ok 2 number(s): "154454 154454"
Test #33:
score: 0
Accepted
time: 25ms
memory: 5172kb
input:
115078 999999245315 726164925974 726165360110 474649463740 474655039338 990086412665 990090397531 551847944476 551851225479 567540161609 567551469852 742245705160 742252733193 746598964496 746605284297 188464429152 188484724458 897480892021 897482113232 205131961158 205146617239 883179289108 8832025...
output:
115078 115078
result:
ok 2 number(s): "115078 115078"
Test #34:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
78 2234 843 1954 1253 2232 76 1630 1959 2182 846 1516 1593 2179 299 625 584 2212 1737 2234 0 1623 1204 2223 0 1393 0 704 1199 2234 2128 2233 166 2079 101 2234 0 313 26 2233 309 1350 589 2091 2162 2197 802 2205 929 2214 2170 2224 168 1973 1392 2100 0 285 0 934 1633 2234 291 981 0 1589 1000 1974 717 2...
output:
2 70
result:
ok 2 number(s): "2 70"
Test #35:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
30 5236 102 4343 2803 4386 344 5236 2580 3155 1545 4398 341 4397 630 5227 109 2790 883 5202 3093 5224 399 5042 3310 5227 3815 5223 3688 4881 3106 5229 4651 5236 3154 5235 3346 5236 4024 5234 0 179 0 43 2101 5215 0 1228 43 1420 3181 5213 2469 4777 1357 2215 1863 4716 854 5228 881 3355
output:
2 28
result:
ok 2 number(s): "2 28"
Test #36:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
48 661 458 661 13 330 84 370 0 364 376 661 531 658 414 650 0 214 0 93 149 659 394 661 567 656 294 436 389 658 0 648 248 655 167 571 213 660 207 658 17 654 652 657 24 617 9 659 636 659 501 623 146 659 414 653 52 655 0 273 54 627 0 382 0 38 68 661 193 651 17 609 497 661 458 654 530 629 152 563 548 649...
output:
2 42
result:
ok 2 number(s): "2 42"
Test #37:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
59 2799 0 1846 1340 2799 842 2796 1975 2575 0 210 1021 2140 1110 2743 1324 2733 1941 2777 1481 2752 1120 2799 106 2799 493 2675 1686 2772 590 2792 185 1459 582 2563 1480 2797 1624 2777 1578 2798 0 236 1 2747 1870 2799 2365 2799 2448 2706 2364 2799 1769 2787 711 2780 0 493 941 2760 0 2073 610 2791 21...
output:
2 52
result:
ok 2 number(s): "2 52"
Test #38:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
82 9770 0 8852 1138 9770 187 9759 44 9281 3526 9770 7695 9763 1504 9424 5233 9664 6228 9742 6942 9738 7632 8434 0 6014 1401 9766 1137 9757 4341 9713 363 7429 6857 9769 7027 9678 7084 9735 0 9374 1412 9757 857 9547 2806 9763 7143 9770 9360 9767 4812 9705 0 7831 2271 9501 0 4564 6664 9284 1143 9546 33...
output:
2 75
result:
ok 2 number(s): "2 75"
Test #39:
score: 0
Accepted
time: 56ms
memory: 9228kb
input:
180887 999999512581 825645680629 999999512444 536478255934 999998616065 409631587128 999999512500 719088816425 999999512505 361226792813 999943213665 853989063515 996896583367 69516673712 832475718652 692168204600 999951479424 966706683862 999999512569 474792661853 996740811688 782369499430 99999951...
output:
2 174480
result:
ok 2 number(s): "2 174480"
Test #40:
score: 0
Accepted
time: 52ms
memory: 8916kb
input:
166215 999999083910 932277721669 999998808152 820286890342 999877234734 797971830723 999999083200 802736924119 999998816196 418320449194 999998179022 138957158461 998848120012 226705257369 999998856294 605112412397 999997350907 691832556943 999994593988 10771104315 999739205567 0 281303135424 383628...
output:
2 160330
result:
ok 2 number(s): "2 160330"
Test #41:
score: 0
Accepted
time: 47ms
memory: 7680kb
input:
140033 999999964495 884152331309 999953407316 689367125269 999999964489 885750454891 999999964462 933825523579 999999964484 312315580865 999999964494 177462088684 927821761805 343405892046 999999862210 129067394078 999999964091 966134424534 999992445170 174886547104 999999762042 950004886055 9985184...
output:
2 135058
result:
ok 2 number(s): "2 135058"
Test #42:
score: 0
Accepted
time: 48ms
memory: 8984kb
input:
168314 999999877582 339184905364 999897694096 822226436710 998667736142 578878409980 999989795547 416190316764 998234257560 681958152404 999999849490 312138705115 999948646000 368033879072 999998499083 144465335703 999074362948 13583338497 977872674905 0 40485561458 681152230065 999928107468 5616034...
output:
2 162357
result:
ok 2 number(s): "2 162357"
Test #43:
score: 0
Accepted
time: 57ms
memory: 10312kb
input:
193662 999999481410 48176056775 984631639081 625530390709 994363764795 649863398127 999994504395 244592112914 995881716471 300778515488 999493532585 529693652183 999998408499 680662628202 999999481143 989073594529 999999481405 280035466277 999999481409 183174794987 999973913647 568855133006 99999947...
output:
2 186799
result:
ok 2 number(s): "2 186799"
Test #44:
score: 0
Accepted
time: 27ms
memory: 5632kb
input:
142981 689077158414 577043733416 689077158414 318699618556 689077158414 151791726189 689077158414 305962387130 689077158414 579827992588 689077158414 357142961420 689077158414 353006146730 689077158414 294681062994 689077158414 617099319549 689077158414 104611035315 689077158414 236124080662 6890771...
output:
1 142981
result:
ok 2 number(s): "1 142981"
Test #45:
score: 0
Accepted
time: 33ms
memory: 7404kb
input:
123181 855545768529 0 527287811109 0 692513251203 0 276864636907 0 551241902836 0 80778003487 0 186997709911 0 355175374754 0 598703575455 0 481681649574 0 73669990574 0 281996405182 0 224963078139 0 185832638677 0 280040834540 0 544482771347 0 648066200726 0 747361067727 0 250057987031 0 3620158641...
output:
1 123181
result:
ok 2 number(s): "1 123181"
Test #46:
score: 0
Accepted
time: 16ms
memory: 4668kb
input:
95109 782835636526 279886019094 782835636526 638701338023 782835636526 240321214781 782835636526 249445400926 782835636526 526172652353 782835636526 639585991490 782835636526 296351825108 782835636526 546835594162 782835636526 549746432638 782835636526 210483642332 782835636526 754966062730 78283563...
output:
1 95109
result:
ok 2 number(s): "1 95109"
Test #47:
score: 0
Accepted
time: 15ms
memory: 5976kb
input:
73793 164940686270 0 17433432279 0 89114952185 0 109134500769 0 108976903952 0 16862518764 0 76491295794 0 65146068469 0 70939044771 0 63624870810 0 49847442041 0 85689576478 0 118107294941 0 159139216373 0 139920434124 0 90188584091 0 85044281094 0 70885188084 0 12882988449 0 157328726076 0 1328533...
output:
1 73793
result:
ok 2 number(s): "1 73793"
Test #48:
score: 0
Accepted
time: 29ms
memory: 5288kb
input:
138153 956139304493 35612602936 956139304493 390290432506 956139304493 360592236152 956139304493 430291620555 956139304493 435643452641 956139304493 843864313528 956139304493 870887936524 956139304493 401437742452 956139304493 682416504370 956139304493 497789143483 956139304493 425599725591 95613930...
output:
1 138153
result:
ok 2 number(s): "1 138153"
Test #49:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
934 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 482 0 48...
output:
1 1
result:
ok 2 number(s): "1 1"
Test #50:
score: 0
Accepted
time: 3ms
memory: 6044kb
input:
78571 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 317 0 ...
output:
1 1
result:
ok 2 number(s): "1 1"
Test #51:
score: 0
Accepted
time: 10ms
memory: 6668kb
input:
107346 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0 105 0...
output:
1 1
result:
ok 2 number(s): "1 1"
Test #52:
score: 0
Accepted
time: 7ms
memory: 5812kb
input:
69341 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 726 0 ...
output:
1 1
result:
ok 2 number(s): "1 1"
Test #53:
score: 0
Accepted
time: 11ms
memory: 6880kb
input:
120692 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0 908 0...
output:
1 1
result:
ok 2 number(s): "1 1"
Test #54:
score: 0
Accepted
time: 20ms
memory: 4764kb
input:
92600 899738889826 426830588005 473110965778 365999817027 534127316024 410474267648 489470515171 59143880730 841260851614 176653551880 723285887633 278567881624 620840036645 291557563468 608226270960 296496467903 603536191129 23547963258 876258669143 72653946767 828064323550 392507825953 50787604540...
output:
1 92600
result:
ok 2 number(s): "1 92600"
Test #55:
score: 0
Accepted
time: 14ms
memory: 4240kb
input:
65905 436519933599 151682561703 283535393643 58634773523 377354755874 195753578096 240373114651 179583655353 255772471895 127975266139 307696923749 46157133075 389770171159 156699434991 278776770789 90821370277 345206121014 140875227430 294635435243 48930232016 387032300053 69524171618 366758886286 ...
output:
1 65905
result:
ok 2 number(s): "1 65905"
Test #56:
score: 0
Accepted
time: 6ms
memory: 3620kb
input:
27371 901564415809 395242895567 504800752585 421880623258 478576331220 397788884944 502394724594 430041349599 470269142690 122926645408 775774999223 442129472990 457292556721 137395486415 762072299506 13618230675 886661180076 386656934862 513125212266 214101255738 685696291505 239123825816 660787972...
output:
1 27371
result:
ok 2 number(s): "1 27371"
Test #57:
score: 0
Accepted
time: 23ms
memory: 5296kb
input:
126382 309000231199 144775794453 164326994294 42056972833 266857786893 129676651101 179368155301 55422365437 253546262846 135478470869 173651710539 46643951821 262154217846 122588653041 186404311548 17627493512 291304979222 141196900695 167852869061 22684113017 286138338816 3461161280 305464222220 8...
output:
1 126382
result:
ok 2 number(s): "1 126382"
Test #58:
score: 0
Accepted
time: 2ms
memory: 3832kb
input:
8942 479958479104 98601802543 381637678203 105778049588 373896264513 1970556489 478602109024 153808578076 324680659362 78370847031 401550954424 49026186939 431466074509 218229869152 263576028670 123294687396 355729128344 88377734799 391344840704 81949407643 398169876930 183156245462 296810658976 148...
output:
1 8942
result:
ok 2 number(s): "1 8942"
Test #59:
score: 0
Accepted
time: 30ms
memory: 7368kb
input:
168127 927698122514 276204290488 848399366020 0 927698122514 0 927698122514 0 927698122514 324389326947 450907489200 0 927698122514 189503750732 408567385851 0 927698122514 58022459614 126283890024 0 927698122514 441007085816 761927994700 813907804196 886394219526 87968718396 332845839941 3193268457...
output:
1 84245
result:
ok 2 number(s): "1 84245"
Test #60:
score: 0
Accepted
time: 15ms
memory: 6060kb
input:
107354 788589901002 122608333072 572467631268 451678878510 779308952217 59835229888 656193842335 35065540603 470801076228 0 788589901002 0 788589901002 108652962723 557965473716 355132674271 419029869884 0 788589901002 0 788589901002 0 788589901002 0 788589901002 0 788589901002 0 788589901002 0 7885...
output:
1 53731
result:
ok 2 number(s): "1 53731"
Test #61:
score: 0
Accepted
time: 29ms
memory: 7256kb
input:
161806 687049433344 0 687049433344 0 687049433344 0 687049433344 0 687049433344 534185555586 618080703232 0 687049433344 279674282343 535568224551 575235715827 602589098724 0 687049433344 161060395701 281347643396 0 687049433344 0 687049433344 427461372739 625573699890 252910095213 639312070212 9815...
output:
1 81089
result:
ok 2 number(s): "1 81089"
Test #62:
score: 0
Accepted
time: 14ms
memory: 5172kb
input:
77615 442085433825 0 442085433825 0 442085433825 0 442085433825 37279692054 262754112332 164387540262 210054739914 245686904441 342573287585 0 442085433825 0 442085433825 0 442085433825 177543623758 392556071112 252017302968 384006986448 0 442085433825 107303247888 286121063607 0 442085433825 131882...
output:
1 38497
result:
ok 2 number(s): "1 38497"
Test #63:
score: 0
Accepted
time: 9ms
memory: 4688kb
input:
50781 174321114411 14765003367 156061137659 0 174321114411 0 174321114411 0 174321114411 0 174321114411 27542391392 62522943914 707645960 92730867988 5273138136 37180988363 21331446654 126377788660 106896183972 144491226442 0 174321114411 0 174321114411 21087845705 125104830550 0 174321114411 220667...
output:
1 25392
result:
ok 2 number(s): "1 25392"
Test #64:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
3 3 0 3 0 3 0 3
output:
1 1
result:
ok 2 number(s): "1 1"
Test #65:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
3 3 0 3 0 2 2 3
output:
1 2
result:
ok 2 number(s): "1 2"
Test #66:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
3 3 0 1 1 2 2 3
output:
3 3
result:
ok 2 number(s): "3 3"
Test #67:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
1 1000000000000 0 1000000000000
output:
1 1
result:
ok 2 number(s): "1 1"