QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#88820 | #4906. 球球 | zhouhuanyi | 10 | 5ms | 14080kb | C++23 | 1.9kb | 2023-03-17 16:29:37 | 2023-03-17 16:29:40 |
Judging History
answer
#include<iostream>
#include<cstdio>
#define N 5000
#define inf 1e18
using namespace std;
int read()
{
char c=0;
int sum=0,f=1;
while (c!='-'&&(c<'0'||c>'9')) c=getchar();
if (c=='-') c=getchar(),f=-1;
while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
return sum*f;
}
void Adder(long long &x,long long d)
{
x=(x<d)?x:d;
return;
}
struct reads
{
long long t,x;
};
reads st[N+1];
int n,ps[N+1][N+1],ps2[N+1][N+1],lst[N+1];
long long dp[N+1][2];
bool used[N+1][N+1];
int main()
{
bool op;
int nw,nw2;
n=read();
for (int i=1;i<=n;++i) st[i].t=read(),st[i].x=read();
for (int i=0;i<=n;++i) dp[i][0]=dp[i][1]=inf;
dp[0][0]=0;
for (int i=n;i>=0;--i)
{
lst[i]=nw=nw2=-1,op=1;
for (int j=i;j>=0;--j)
{
if (st[j].x!=st[i].x)
{
if (lst[i]==-1) lst[i]=j;
if (nw!=-1) op&=(abs(st[nw].x-st[j].x)<=st[nw].t-st[j].t);
nw=j;
}
else nw2=j;
used[j][i]=op,ps[j][i]=nw,ps2[j][i]=nw2;
}
}
for (int i=1;i<=n;++i)
for (int j=1;j<=i;++j)
{
if (ps[j][i]==-1)
{
if (max(dp[j-1][0]+abs(st[j-1].x-st[i].x),st[j-1].t)<=st[j].t) Adder(dp[i][0],max(dp[j-1][0]+abs(st[j-1].x-st[i].x),st[j-1].t));
if (max(dp[j-1][1]+abs(st[lst[j-1]].x-st[i].x),st[j-1].t)<=st[j].t) Adder(dp[i][0],max(dp[j-1][1]+abs(st[lst[j-1]].x-st[i].x),st[j-1].t));
}
else
{
if (max(dp[j-1][0]+abs(st[j-1].x-st[i].x),st[j-1].t)<=st[ps2[j][i]].t&&max(dp[j-1][0]+abs(st[j-1].x-st[i].x),st[j-1].t)+abs(st[i].x-st[ps[j][i]].x)<=st[ps[j][i]].t&&used[j][i]) Adder(dp[i][1],st[i-1].t);
if (max(dp[j-1][1]+abs(st[lst[j-1]].x-st[i].x),st[j-1].t)<=st[ps2[j][i]].t&&max(dp[j-1][1]+abs(st[lst[j-1]].x-st[i].x),st[j-1].t)+abs(st[i].x-st[ps[j][i]].x)<=st[ps[j][i]].t&&used[j][i]) Adder(dp[i][1],st[i-1].t);
}
}
puts((dp[n][0]!=inf||dp[n][1]!=inf)?"YES":"NO");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 3ms
memory: 7312kb
input:
5 2 1 3 2 9 6 10 5 13 -1
output:
NO
result:
ok single line: 'NO'
Test #2:
score: 0
Accepted
time: 2ms
memory: 7552kb
input:
5 1 1 3 2 4 -1 6 4 10 -1
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 1ms
memory: 7336kb
input:
4 16 13 18 4 20 3 21 5
output:
NO
result:
ok single line: 'NO'
Test #4:
score: 0
Accepted
time: 2ms
memory: 7524kb
input:
5 2 1 3 2 8 6 10 5 13 0
output:
YES
result:
ok single line: 'YES'
Test #5:
score: 0
Accepted
time: 2ms
memory: 11596kb
input:
5 2 1 3 2 9 6 10 5 13 0
output:
YES
result:
ok single line: 'YES'
Test #6:
score: 0
Accepted
time: 3ms
memory: 9448kb
input:
5 1 1 3 2 4 0 6 4 10 -1
output:
YES
result:
ok single line: 'YES'
Test #7:
score: 0
Accepted
time: 2ms
memory: 7368kb
input:
3 1 0 5 5 6 2
output:
YES
result:
ok single line: 'YES'
Test #8:
score: 0
Accepted
time: 2ms
memory: 7436kb
input:
5 2 1 6 0 7 -1 8 2 9 -2
output:
YES
result:
ok single line: 'YES'
Test #9:
score: 0
Accepted
time: 0ms
memory: 7400kb
input:
5 30 10 40 -10 51 9 52 8 53 20
output:
YES
result:
ok single line: 'YES'
Test #10:
score: 0
Accepted
time: 1ms
memory: 9416kb
input:
3 2 2 5 5 6 1
output:
YES
result:
ok single line: 'YES'
Subtask #2:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #11:
score: 5
Accepted
time: 0ms
memory: 11860kb
input:
100 51823 -51823 80072 -23574 152202 48556 263343 -14629 356859 -38607 441850 -193136 442857 -192129 471412 -108145 504392 -187704 582081 -265393 680615 -220684 775219 -261463 781624 -267868 801370 -287614 899570 -166859 982377 -272221 1048767 -338611 1094930 -189414 1170308 -460152 1222829 -512673 ...
output:
YES
result:
ok single line: 'YES'
Test #12:
score: 0
Accepted
time: 0ms
memory: 13968kb
input:
100 106661 51112 155727 44629 204995 -4639 289968 -89612 352826 -26754 358628 -32556 456755 -130683 458435 -4437 484255 -103183 506353 -125281 537685 -93949 599460 -129003 697511 -32174 746550 -179264 749060 -176754 751112 -178806 756783 -173135 847195 -82723 886372 -43546 953837 23919 1050796 -7304...
output:
YES
result:
ok single line: 'YES'
Test #13:
score: 0
Accepted
time: 0ms
memory: 13912kb
input:
100 51953 51953 178909 4607 255989 -75003 303522 -152083 375771 -271865 422215 -318309 446399 -294125 534441 -382167 591666 -324942 665189 -398465 759160 -492436 856968 -394628 878236 -415896 978225 -199616 1004339 -342021 1011649 -349331 1056555 -304425 1121330 -315907 1124074 -242394 1192744 -3110...
output:
YES
result:
ok single line: 'YES'
Test #14:
score: 0
Accepted
time: 3ms
memory: 11876kb
input:
100 73696 -73696 130808 -16584 148097 -33873 159200 -31805 188326 -40840 268182 -69966 348208 89916 447670 9890 496101 38885 513498 56282 573623 -3843 583217 -13437 657874 61220 710362 -9546 801558 204904 803207 203255 815582 215630 821981 113708 825066 206146 833562 214642 916609 209231 985412 3664...
output:
YES
result:
ok single line: 'YES'
Test #15:
score: 0
Accepted
time: 3ms
memory: 9952kb
input:
100 66236 -66236 106931 -25541 163181 30709 203283 70811 234361 101889 307135 174663 327411 154387 341023 140775 473140 102431 484717 196204 524294 224204 612604 312514 669989 255129 767775 157343 803254 184627 824552 100566 889399 35719 968028 -42910 1006330 121864 1073474 -148356 1153800 -68030 12...
output:
YES
result:
ok single line: 'YES'
Test #16:
score: 0
Accepted
time: 4ms
memory: 13872kb
input:
100 82834 -82834 248482 -53442 338177 -150962 437708 -63278 483691 -17295 518642 -52246 567982 36253 649231 -101586 674192 -182835 765490 -249172 826825 -187837 855184 -157874 924507 -146873 948896 -122484 972376 -216196 978161 -99004 1048080 -104789 1147957 -274585 1160059 -262483 1184037 -286461 1...
output:
YES
result:
ok single line: 'YES'
Test #17:
score: 0
Accepted
time: 4ms
memory: 13832kb
input:
100 91929 91929 188131 188131 198025 154664 210890 165372 211317 165799 290526 245008 290567 178237 340724 295124 405545 244967 496543 268947 553096 212394 573058 232356 654081 313379 678974 338272 762176 421474 862069 359945 866678 316972 903067 321581 980960 358476 1012412 280583 1032656 306780 10...
output:
YES
result:
ok single line: 'YES'
Test #18:
score: 0
Accepted
time: 4ms
memory: 12036kb
input:
100 4483 4483 89756 89756 213487 -33975 259610 5989 280159 -100647 353529 -174017 367495 -160051 417893 -80098 506283 -21263 543352 -58332 550427 -109653 631669 15835 656725 -65407 664733 -1213 728813 62867 782181 9499 868600 95918 958063 6455 1015984 -9221 1059787 64376 1104762 20573 1163127 -24402...
output:
YES
result:
ok single line: 'YES'
Test #19:
score: 0
Accepted
time: 2ms
memory: 11884kb
input:
100 34147 -34147 125881 -345 202224 57587 295718 40436 346068 90786 402776 34078 468919 133930 528960 40180 617215 -48075 665464 100221 738036 72746 769757 174 783894 55162 864594 -25538 938947 48815 1005807 115675 1070941 50541 1147275 41025 1230377 43773 1324332 137728 1401300 214696 1430687 18530...
output:
YES
result:
ok single line: 'YES'
Test #20:
score: 0
Accepted
time: 1ms
memory: 11864kb
input:
100 77792 -77792 169295 13711 305132 -55629 399497 105233 434076 10868 494655 131233 588394 70654 673278 309856 761111 397689 768489 390311 814988 343812 877420 406244 931377 460201 981245 410333 1041309 470397 1046667 465039 1062707 448999 1065990 452282 1068470 454762 1079487 443745 1174576 538834...
output:
YES
result:
ok single line: 'YES'
Test #21:
score: 0
Accepted
time: 1ms
memory: 11820kb
input:
100 53894 53894 135442 135442 200367 110566 243624 193872 332119 282367 340178 274308 385363 150615 399225 305631 476516 228340 540645 292469 570313 322137 593223 299227 651531 357535 668057 319493 727163 341009 759414 400115 832493 359287 918275 432366 961384 273505 1021849 290861 1031313 230396 11...
output:
YES
result:
ok single line: 'YES'
Test #22:
score: 0
Accepted
time: 4ms
memory: 13700kb
input:
100 52893 -52893 101814 -3972 239224 -87898 265563 -141382 266345 -114261 313693 -115043 394360 13754 493999 -85885 497056 -82828 575421 -66913 628962 -58004 725367 38401 757850 -4463 803225 116259 894789 24695 964839 70884 1044708 34514 1127864 -45355 1131503 117670 1170887 81925 1246292 6520 13038...
output:
YES
result:
ok single line: 'YES'
Test #23:
score: 0
Accepted
time: 2ms
memory: 12004kb
input:
100 121036 47104 155723 155723 208299 103147 225499 120347 321564 216412 415194 121036 458597 310042 492954 300996 575691 383733 632527 326897 647556 266639 672666 336978 701097 311868 723032 365409 737937 402249 802710 337476 869271 270915 939270 387344 987072 388716 1070505 340914 1076499 299289 1...
output:
YES
result:
ok single line: 'YES'
Test #24:
score: 0
Accepted
time: 3ms
memory: 11816kb
input:
100 19066 -19066 79299 41167 248978 -128512 341368 -38641 415112 -147158 486846 -75424 509843 -98421 597101 -220902 605342 -193920 660614 -249192 695083 -214723 778077 -131729 789682 -143334 851784 -205436 892446 -246098 928768 -185679 937603 -200941 999196 -262534 1030177 -209776 1055175 -256551 10...
output:
YES
result:
ok single line: 'YES'
Test #25:
score: 0
Accepted
time: 4ms
memory: 13632kb
input:
100 104982 -104982 194273 -15691 231648 21684 253273 43309 277325 19257 351385 93317 386548 128480 411038 -42838 478035 170987 500232 103990 520396 213348 562937 255889 592884 193184 643292 235428 659690 251826 659920 252056 669036 261172 683945 285836 767694 330012 863454 425772 936414 246263 10076...
output:
YES
result:
ok single line: 'YES'
Test #26:
score: 0
Accepted
time: 1ms
memory: 11860kb
input:
100 70425 70425 165404 165404 229545 101263 297118 137503 366451 106170 438717 -35429 441973 -32173 457797 -16349 480072 -38624 534875 -93427 612510 -15792 667662 36837 722947 39360 802272 -15925 890279 -95250 892397 -9361 955792 -7243 987819 86061 1040030 54034 1125407 52895 1217142 138272 1255132 ...
output:
YES
result:
ok single line: 'YES'
Test #27:
score: 0
Accepted
time: 1ms
memory: 13760kb
input:
100 76981 -76981 232876 -20663 320578 -32538 403941 -120240 496213 -41447 544550 50825 581113 6890 632861 -29673 649124 -65158 668174 -46108 681614 -32668 737144 -88198 780617 -81421 790720 -121568 837225 -168073 891831 -131671 900080 -214430 930505 -244855 1018493 -156867 1027988 -147372 1066446 -2...
output:
YES
result:
ok single line: 'YES'
Test #28:
score: 0
Accepted
time: 0ms
memory: 9840kb
input:
100 89389 89389 156281 22497 253884 -75106 285205 -106427 298414 -93218 313370 -108174 317620 -103924 350775 -137079 384826 -171130 394525 -161431 430874 -197780 556699 -323605 639587 -406493 655824 -236376 745520 -390256 814508 -410964 875056 -479952 890537 -350416 941713 -365897 997165 -417073 100...
output:
YES
result:
ok single line: 'YES'
Test #29:
score: 0
Accepted
time: 1ms
memory: 13892kb
input:
100 7156 7156 17981 17981 37569 37569 81723 -6585 148928 -73790 221418 -146280 232512 -157374 253493 -178355 361677 -183493 452238 -92932 511438 -235016 547990 -33732 549824 -72118 634727 -70284 710903 -80845 712665 -82607 715401 -157021 741330 -79871 839580 -105800 851693 -7550 893356 4563 969429 -...
output:
YES
result:
ok single line: 'YES'
Test #30:
score: 0
Accepted
time: 1ms
memory: 11888kb
input:
100 117840 28138 121673 -44851 193649 31971 202192 -48548 282175 -40005 353758 31435 368466 -54856 425105 -111495 463845 -40148 500723 -72755 541362 -76516 616939 -939 675610 57732 722724 -35877 818288 9282 891988 104846 922726 52244 967074 7896 1005889 82982 1061986 -30919 1160798 -87016 1209727 -3...
output:
YES
result:
ok single line: 'YES'
Test #31:
score: 0
Accepted
time: 4ms
memory: 11860kb
input:
100 60626 -60581 189954 -16462 239972 18774 253088 31890 300065 68792 322319 101121 394044 78867 464501 102389 469695 172846 534746 107548 587048 42462 682042 85218 697245 70079 724345 -9840 787448 106082 791861 101638 818610 42979 844082 74920 876263 100392 919306 25168 982324 68130 1042374 88119 1...
output:
NO
result:
ok single line: 'NO'
Test #32:
score: 0
Accepted
time: 1ms
memory: 13868kb
input:
100 143896 59539 196448 -77370 262369 -11449 309198 -24818 389887 -138967 430809 -58278 503227 -107372 567472 -179889 664983 -73983 728052 -171506 744097 -26959 749079 -10914 756094 -31941 781205 -38956 837136 -7958 909582 64488 972925 -63978 1026327 181233 1073250 134216 1094877 112683 1128899 1278...
output:
NO
result:
ok single line: 'NO'
Test #33:
score: 0
Accepted
time: 2ms
memory: 11860kb
input:
100 72050 -72050 127608 -127608 202541 -202453 216059 -188860 261290 -234104 348746 -146648 439553 -55841 527555 32161 536499 23217 541577 18139 586908 63470 679903 86423 728808 156465 772705 151457 790315 169067 793195 171947 824063 107560 834039 192910 863364 163535 870619 156259 945063 202815 960...
output:
NO
result:
ok single line: 'NO'
Test #34:
score: 0
Accepted
time: 4ms
memory: 12036kb
input:
100 25278 25236 82501 82501 173431 173431 342557 166735 372056 85520 458605 196234 500099 241289 530642 271832 544930 257544 618713 183761 682587 247697 744199 186147 766751 282783 771583 213531 811351 173763 883412 208699 959549 177839 1045507 91826 1054653 82735 1138204 -816 1142151 101702 1211261...
output:
NO
result:
ok single line: 'NO'
Test #35:
score: 0
Accepted
time: 4ms
memory: 11880kb
input:
100 81237 -81237 165513 -165525 312929 -248023 364458 -312929 447621 -364458 540011 -540011 615683 -615683 680497 -550869 762908 -468458 783808 -489384 811564 -447621 871195 -521285 956657 -461654 969938 -620028 1069526 -606747 1122939 -719616 1137292 -773029 1216670 -787382 1280958 -802472 1313812 ...
output:
NO
result:
ok single line: 'NO'
Test #36:
score: 0
Accepted
time: 4ms
memory: 11880kb
input:
100 88417 88417 181603 181603 236012 127260 261251 104062 311990 152694 321638 143046 364855 186263 463672 285017 508105 240521 542835 101955 612127 344543 674045 406461 733105 347401 812039 268467 833318 289746 898811 224253 908907 234349 955450 275251 1000461 235881 1055195 290615 1107632 343052 1...
output:
NO
result:
ok single line: 'NO'
Test #37:
score: 0
Accepted
time: 5ms
memory: 11888kb
input:
100 7576 7576 76331 76331 144039 72116 238831 230401 261988 253558 262970 252576 300034 215512 385071 135609 420780 166184 520199 265633 582699 130475 583490 202372 651208 203163 734107 352989 740309 346787 760610 326486 844818 242278 943827 341287 1015483 269631 1063389 317537 1157285 223641 120201...
output:
NO
result:
ok single line: 'NO'
Test #38:
score: 0
Accepted
time: 1ms
memory: 12008kb
input:
100 117196 -90464 168952 -65440 178446 -117196 191337 -62043 282253 28873 373845 -74934 414411 79899 424118 70154 442379 51837 471965 22345 504400 -10090 512991 -18681 534448 120465 593071 61399 598589 55881 631792 22678 718884 -64414 781778 2776 867222 -127308 922564 -212752 986075 -93899 1020476 -...
output:
NO
result:
ok single line: 'NO'
Test #39:
score: 0
Accepted
time: 0ms
memory: 13904kb
input:
100 105005 -105005 127165 -82845 142373 -98053 236681 -3745 326967 86541 420336 -6828 427836 -14328 469267 -84292 483033 -41993 562393 -121353 657751 -216711 684166 -55759 745007 -251137 820570 -175574 878248 -233290 920766 -275770 947236 -249300 1016460 -190296 1096727 -238257 1169851 -165133 12238...
output:
NO
result:
ok single line: 'NO'
Test #40:
score: 0
Accepted
time: 2ms
memory: 14080kb
input:
100 85627 -85627 183533 -73295 269408 -159170 302102 -128414 348422 -126476 376729 -51849 474226 45648 506859 78291 518899 90321 527097 82123 549973 59339 589178 98636 622505 -80156 650410 65309 670319 73305 736888 139874 780741 96021 820862 136142 916107 93214 917835 42571 996477 40870 1095409 1212...
output:
NO
result:
ok single line: 'NO'
Test #41:
score: 0
Accepted
time: 0ms
memory: 11976kb
input:
100 81701 81701 215706 150496 235932 235932 305676 305676 336471 274881 356610 295020 439447 377922 482081 335353 544313 397585 564029 215706 574481 417301 667946 334230 761311 427595 856658 332248 916653 392243 961904 437494 970348 429050 978735 420663 991385 427724 1064503 360195 1092058 387750 11...
output:
NO
result:
ok single line: 'NO'
Test #42:
score: 0
Accepted
time: 0ms
memory: 11972kb
input:
100 82914 -82914 191148 25320 261812 -41465 298359 -45344 309574 -8797 358786 2418 390932 83776 472983 165827 551804 244648 558028 51630 579898 260294 584947 265343 643094 323490 699057 379453 747334 427730 781693 462089 853539 390243 948355 485059 991670 238424 1069127 528374 1144629 605831 1150135...
output:
NO
result:
ok single line: 'NO'
Test #43:
score: 0
Accepted
time: 1ms
memory: 11892kb
input:
100 54782 54782 72506 37058 191254 78971 244954 55836 321211 2136 416923 -116133 459576 -73567 525832 -20421 598863 -139910 683709 -297787 736751 -350829 833343 -254237 890201 -197379 978719 -285897 998262 -266354 1001352 -263264 1005257 -212941 1073171 -267169 1162840 -245414 1178296 -229958 125246...
output:
NO
result:
ok single line: 'NO'
Test #44:
score: 0
Accepted
time: 1ms
memory: 13876kb
input:
100 50514 50520 193479 134177 259987 141383 305971 95399 346593 54777 423357 -21987 515309 74875 520708 69965 556641 100499 592502 136360 600988 127874 689704 216590 701278 64566 779273 204925 785519 120775 856648 191904 869158 204414 891259 182313 977019 127021 994311 285365 1041602 238074 1124858 ...
output:
NO
result:
ok single line: 'NO'
Test #45:
score: 0
Accepted
time: 1ms
memory: 12032kb
input:
100 59401 -59401 95168 -23634 156601 37799 198986 4767 269590 74 335981 -132195 378074 -65804 397451 -154980 489994 -62368 546068 -6294 591244 -51470 673127 -174288 771083 -231309 860091 -320317 911765 -268643 988563 -191845 1031966 -133353 1129661 -137553 1154462 -235248 1228195 -162354 1228341 -23...
output:
NO
result:
ok single line: 'NO'
Test #46:
score: 0
Accepted
time: 0ms
memory: 13800kb
input:
100 68962 68962 131826 131826 153032 153032 306627 306627 389165 224089 476933 241628 564240 224550 590873 311857 603058 238998 629173 251183 713223 181063 722301 171985 757925 136361 781141 159577 833005 265113 840352 107713 896126 59286 993301 -37889 1017888 -13302 1083243 -78657 1170957 9057 1187...
output:
NO
result:
ok single line: 'NO'
Test #47:
score: 0
Accepted
time: 0ms
memory: 11888kb
input:
100 35441 35441 53627 17226 116533 25219 212874 121560 238323 -10216 254397 130935 295739 89593 314444 108298 395848 189702 423709 217563 434888 147009 475446 246942 550224 172164 625587 206384 704392 247527 776267 168722 806419 96847 900766 -27652 939314 10896 985565 57147 1023155 66695 1048452 947...
output:
YES
result:
ok single line: 'YES'
Test #48:
score: 0
Accepted
time: 0ms
memory: 14028kb
input:
100 52338 -52338 114539 9863 207208 -82806 250530 -75420 326991 -151881 389532 -100774 446444 -271334 525780 -350670 593758 -282692 690111 -379045 749652 -319504 783290 -214353 815950 -253206 843036 -226120 919279 -302281 981205 -285866 1040862 -364289 1110697 -374467 1203281 -304632 1273864 -467051...
output:
NO
result:
ok single line: 'NO'
Test #49:
score: 0
Accepted
time: 0ms
memory: 11856kb
input:
100 48687 48687 166569 -69269 186604 -89230 280547 -183173 289599 -192225 351546 -130278 394768 -173500 439049 -217781 500346 -279078 536497 25932 595838 -302268 605732 -312162 613144 -319574 675774 -256944 745687 -187031 770021 -211365 851261 -242927 927122 -368466 955541 -292605 1005029 -389535 10...
output:
NO
result:
ok single line: 'NO'
Test #50:
score: 0
Accepted
time: 2ms
memory: 12004kb
input:
100 11296 -11296 39104 -39104 71206 -7002 120841 -56637 208300 -35825 255609 -55163 328806 -128360 388414 -68752 450880 -102472 501252 -181590 511131 -131218 512359 -190241 563241 -241123 567121 -191469 640848 -163516 668714 -191382 739980 -262648 796285 -237243 893903 -416571 949104 -318953 1032640...
output:
NO
result:
ok single line: 'NO'
Subtask #3:
score: 0
Memory Limit Exceeded
Dependency #2:
100%
Accepted
Test #51:
score: 0
Memory Limit Exceeded
input:
5000 89276 25828 169878 -54774 248197 23545 277791 -6049 376036 92196 411164 127324 434915 151075 479167 106823 550715 -31724 554339 38899 629511 -36273 710530 -117292 798775 35275 837137 -205537 848688 -232348 934523 -318183 946620 -243899 1006976 -245730 1068431 -306086 1106403 -184275 1141056 -18...
output:
result:
Subtask #4:
score: 0
Memory Limit Exceeded
Test #91:
score: 0
Memory Limit Exceeded
input:
5000 6 6 80 80 170 48 240 106 243 179 329 176 412 93 485 176 552 249 555 316 613 371 650 313 733 251 735 253 736 334 815 254 893 333 943 255 965 227 1022 284 1116 205 1174 320 1230 376 1318 378 1336 288 1430 212 1494 276 1562 344 1597 309 1638 350 1716 272 1793 349 1809 365 1908 306 1951 464 2037 42...
output:
result:
Subtask #5:
score: 0
Skipped
Dependency #3:
0%
Subtask #6:
score: 0
Skipped
Dependency #5:
0%
Subtask #7:
score: 0
Skipped
Dependency #4:
0%
Subtask #8:
score: 0
Skipped
Dependency #7:
0%