QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#618667 | #2774. Scenery | Charizard2021 | AC ✓ | 1341ms | 5064kb | C++14 | 2.4kb | 2024-10-07 02:48:37 | 2024-10-07 02:48:38 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, t;
cin >> n >> t;
vector<pair<int, int> > v(1 + n);
vector<int> x;
x.push_back(0);
for(int i = 1; i <= n; i++){
cin >> v[i].first >> v[i].second;
x.push_back(v[i].first);
x.push_back(v[i].second);
}
sort(x.begin() + 1, x.end());
int idx = unique(x.begin() + 1, x.end()) - x.begin() - 1;
vector<int> v2[1 + idx];
for(int i = 1; i <= n; i++){
v[i].first = lower_bound(x.begin() + 1, x.begin() + idx+ 1, v[i].first) - x.begin();
v[i].second = lower_bound(x.begin() + 1, x.begin() + idx + 1, v[i].second) - x.begin();
v2[v[i].first].push_back(v[i].second);
}
vector<int> counter(1 + idx, 0);
vector<int> val1(1 + idx);
for(int j = 1; j <= idx; j++){
val1[j] = x[j];
}
vector<int> positions(1 + idx, idx);
vector<int> things(1 + idx, 1e9);
vector<int> cur(1 + idx);
bool works = true;
for(int i = idx; i >= 1; i--){
if(!v2[i].empty()){
for(int j = 1; j <= idx; j++){
cur[j] = things[j];
}
for(int j : v2[i]){
for(int k = j; k <= idx; k++){
counter[k]++;
}
}
for(int j = idx; j >= i; j--){
for(int a = 0; a < counter[j]; a++){
val1[j] -= t;
while(positions[j] && val1[j] < x[positions[j]]){
if(val1[j] < x[i]){
works = false;
break;
}
val1[j] = min(val1[j], cur[positions[j]]);
positions[j]--;
}
if(!works){
break;
}
if(val1[j] < x[i]){
works = false;
break;
}
things[i] = min(things[i], val1[j] - t);
}
if(!works){
break;
}
counter[j] = 0;
}
if(!works){
break;
}
}
if(!works){
break;
}
}
if(works){
cout << "yes\n";
}
else{
cout << "no\n";
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3540kb
input:
2 10 0 15 5 20
output:
yes
result:
ok single line: 'yes'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
2 10 1 15 0 20
output:
no
result:
ok single line: 'no'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
2 10 5 30 10 20
output:
yes
result:
ok single line: 'yes'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
11 6 0 74 2 60 4 34 10 36 21 46 26 40 28 38 30 48 50 68 52 68 54 62
output:
yes
result:
ok single line: 'yes'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
11 6 0 74 2 60 4 34 10 36 21 46 26 40 28 38 30 48 50 68 52 67 54 62
output:
no
result:
ok single line: 'no'
Test #6:
score: 0
Accepted
time: 563ms
memory: 4528kb
input:
9695 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 303 313 331 360 341 351 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #7:
score: 0
Accepted
time: 563ms
memory: 4544kb
input:
9696 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 303 313 331 360 341 351 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 487 49...
output:
no
result:
ok single line: 'no'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
2 42 10 90 10 90
output:
no
result:
ok single line: 'no'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2 42 6 90 6 90
output:
yes
result:
ok single line: 'yes'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
3 1 0 2 0 1 0 2
output:
no
result:
ok single line: 'no'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
3 1 0 1000000000 0 1 0 2
output:
yes
result:
ok single line: 'yes'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
5 5 0 29 1 24 3 14 2 19 4 9
output:
yes
result:
ok single line: 'yes'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
5 5 3 15 1 25 4 10 2 20 0 28
output:
yes
result:
ok single line: 'yes'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
5 5 2 19 3 14 0 28 4 9 1 24
output:
no
result:
ok single line: 'no'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
5 10 31 41 1 11 11 21 21 31 41 51
output:
yes
result:
ok single line: 'yes'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
5 10 11 21 32 43 1 11 41 51 21 31
output:
no
result:
ok single line: 'no'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
10 2 9 11 0 20 0 20 0 20 0 20 0 20 0 20 0 20 0 20 0 20
output:
no
result:
ok single line: 'no'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
10 2 10 12 0 20 0 20 0 20 0 20 0 20 0 20 0 20 0 20 0 20
output:
yes
result:
ok single line: 'yes'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
11 3 12 15 17 20 1 38 2 38 3 35 4 33 5 32 6 29 7 27 8 26 9 23
output:
yes
result:
ok single line: 'yes'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
11 3 12 15 17 20 1 37 2 37 3 35 4 33 5 32 6 29 7 27 8 26 9 23
output:
no
result:
ok single line: 'no'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
11 3 12 15 17 20 1 38 2 35 3 32 4 32 5 29 6 27 7 26 8 23 9 21
output:
yes
result:
ok single line: 'yes'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
11 3 12 15 17 20 1 37 2 35 3 32 4 32 5 29 6 27 7 26 8 23 9 21
output:
no
result:
ok single line: 'no'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
1 42 9 52
output:
yes
result:
ok single line: 'yes'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
1 42 11 53
output:
yes
result:
ok single line: 'yes'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
11 6 12 20 6 22 6 24 26 44 36 46 34 48 28 53 38 64 40 70 14 72 0 74
output:
yes
result:
ok single line: 'yes'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
11 6 12 20 7 22 6 24 26 44 36 46 34 48 28 53 38 64 40 70 14 72 0 74
output:
no
result:
ok single line: 'no'
Test #27:
score: 0
Accepted
time: 4ms
memory: 3672kb
input:
1000 10 2531 2541 7171 7181 8601 8611 5681 5691 8271 8281 6031 6041 7481 7491 7141 7151 2841 2851 9651 9661 901 911 8101 8111 4581 4591 781 791 9481 9491 1351 1361 4211 4221 8631 8641 7611 7621 2811 2821 7561 7571 2341 2351 3511 3521 2161 2171 931 941 2361 2371 3261 3271 7471 7481 7591 7601 9701 971...
output:
yes
result:
ok single line: 'yes'
Test #28:
score: 0
Accepted
time: 3ms
memory: 3676kb
input:
1000 10 5391 5401 8741 8751 4491 4501 771 781 4081 4091 4981 4991 8631 8641 7921 7931 8601 8611 4671 4681 671 681 3601 3611 9671 9681 7241 7251 31 41 7471 7481 6981 6991 9581 9591 9521 9531 311 321 571 581 5651 5661 8121 8131 2121 2131 9051 9061 4051 4061 411 421 5851 5861 3421 3431 2181 2191 301 31...
output:
no
result:
ok single line: 'no'
Test #29:
score: 0
Accepted
time: 670ms
memory: 4612kb
input:
9998 100000 0 100000 100000 200000 200000 300000 300000 400000 400000 500000 500000 600000 600000 700000 700000 800000 800000 900000 900000 1000000 1000000 1100000 1100000 1200000 1200000 1300000 1300000 1400000 1400000 1500000 1500000 1600000 1600000 1700000 1700000 1800000 1800000 1900000 1900000 ...
output:
yes
result:
ok single line: 'yes'
Test #30:
score: 0
Accepted
time: 449ms
memory: 4808kb
input:
9998 100000 0 500090002 1 500090003 2 500090004 3 500090005 4 500090006 5 500090007 6 500090008 7 500090009 8 500090010 9 500090011 10 500090012 11 500090013 12 500090014 13 500090015 14 500090016 15 500090017 16 500090018 17 500090019 18 500090020 19 500090021 20 500090022 21 500090023 22 500090024...
output:
yes
result:
ok single line: 'yes'
Test #31:
score: 0
Accepted
time: 4ms
memory: 3712kb
input:
9999 2 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998 0 9998...
output:
yes
result:
ok single line: 'yes'
Test #32:
score: 0
Accepted
time: 209ms
memory: 4160kb
input:
9999 2 0 24998 3 5 0 24998 8 10 0 24998 13 15 0 24998 18 20 0 24998 23 25 0 24998 28 30 0 24998 33 35 0 24998 38 40 0 24998 43 45 0 24998 48 50 0 24998 53 55 0 24998 58 60 0 24998 63 65 0 24998 68 70 0 24998 73 75 0 24998 78 80 0 24998 83 85 0 24998 88 90 0 24998 93 95 0 24998 98 100 0 24998 103 105...
output:
yes
result:
ok single line: 'yes'
Test #33:
score: 0
Accepted
time: 119ms
memory: 3944kb
input:
9998 2 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998 0 4998...
output:
yes
result:
ok single line: 'yes'
Test #34:
score: 0
Accepted
time: 11ms
memory: 3736kb
input:
1000 100000 234294286 234427116 161692120 161858166 192115615 192281661 249806722 249914914 151576139 151708909 114641576 114757960 104548340 104713878 164209630 164310142 157794261 157894325 162645705 162782567 246941564 247041566 239320500 239420503 114930600 115163718 242154008 242254022 16044404...
output:
yes
result:
ok single line: 'yes'
Test #35:
score: 0
Accepted
time: 3ms
memory: 3980kb
input:
10000 2 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20000 0 20...
output:
yes
result:
ok single line: 'yes'
Test #36:
score: 0
Accepted
time: 288ms
memory: 4024kb
input:
10000 2 0 17555 0 19254 0 15037 0 18199 0 11173 0 10572 0 18184 0 15762 0 17553 0 11675 0 13815 0 19695 0 15674 0 12854 0 19852 0 16035 0 15579 0 12043 0 15226 0 19883 0 14158 0 18568 0 12265 0 17070 0 18408 0 13094 0 15787 0 18251 1215 1219 0 12175 0 10628 0 13125 0 17721 0 16106 0 12383 0 14188 0 ...
output:
yes
result:
ok single line: 'yes'
Test #37:
score: 0
Accepted
time: 149ms
memory: 3976kb
input:
10000 2 0 12749 0 12156 0 12589 0 15646 0 17003 0 11243 0 14684 0 17499 0 11267 0 11779 0 18800 0 13045 0 16460 0 18119 0 16146 3110 3114 0 13235 0 19449 0 14430 0 17160 0 19845 4245 4249 0 17029 0 18804 0 15165 0 16667 0 19672 0 14830 0 13756 0 13679 0 16430 0 12714 0 13757 0 16290 0 18071 0 12074 ...
output:
no
result:
ok single line: 'no'
Test #38:
score: 0
Accepted
time: 1294ms
memory: 4984kb
input:
10000 1000 17837225 17838736 13835975 13837485 10147097 10148191 16541494 16546596 22964403 22969753 24876001 24877017 16970577 16980791 13614888 13620046 20608929 20634503 11601939 11603005 22725453 22726484 17440772 17445994 12747736 12749886 19430111 19431112 12502813 12507915 18530376 18537518 1...
output:
yes
result:
ok single line: 'yes'
Test #39:
score: 0
Accepted
time: 1291ms
memory: 4784kb
input:
10000 10000 56933425 57126261 56912552 57110895 56909805 57109504 56918462 57108860 56933012 57117951 76156016 76408259 76164566 76408515 76169547 76398813 76165933 76422619 76156961 76410693 31273183 31423711 31274071 31443006 31295851 31433414 31290019 31445862 31271894 31436748 124134097 12428280...
output:
yes
result:
ok single line: 'yes'
Test #40:
score: 0
Accepted
time: 258ms
memory: 4768kb
input:
10000 10000 2077289 2271938 2066887 2264909 2079933 2277871 2057852 2258918 2079173 2262030 140653393 140757341 140650251 140762746 140649667 140753296 140646497 140754025 140645838 140769611 63566316 63828615 63569276 63813477 63565213 63825681 63574900 63827490 63574016 63835497 166313963 16641066...
output:
no
result:
ok single line: 'no'
Test #41:
score: 0
Accepted
time: 3ms
memory: 3740kb
input:
1000 1000 788 212999 586 414999 509 491999 42 958999 59 941999 359 641999 654 346999 488 512999 109 891999 877 123999 950 50999 250 750999 361 639999 524 476999 931 69999 697 303999 143 857999 12 988999 588 412999 930 70999 649 351999 236 764999 459 541999 214 786999 800 200999 303 697999 592 408999...
output:
yes
result:
ok single line: 'yes'
Test #42:
score: 0
Accepted
time: 6ms
memory: 3716kb
input:
1000 1000 478 522999 30 970999 797 203999 831 169999 277 723999 534 466999 157 843999 143 857999 804 196999 13 987999 285 715999 849 151999 233 767999 465 535999 481 519999 337 663999 773 227999 311 689999 583 417999 604 396999 76 924999 204 796999 140 860999 751 249999 618 382999 779 221999 400 600...
output:
no
result:
ok single line: 'no'
Test #43:
score: 0
Accepted
time: 6ms
memory: 3752kb
input:
1000 1000 532 469000 416 585000 449 552000 762 239000 916 85000 634 367000 409 592000 951 50000 363 638000 260 741000 354 647000 482 519000 158 843000 119 882000 28 973000 630 371000 124 877000 558 443000 955 46000 509 492000 502 499000 302 699000 277 724000 495 506000 445 556000 889 112000 346 6550...
output:
yes
result:
ok single line: 'yes'
Test #44:
score: 0
Accepted
time: 15ms
memory: 3604kb
input:
1000 100 157059 157627 29890 30888 13163 14118 49967 50327 199881 200699 80049 81011 83519 84066 181284 181798 93169 93484 159141 159529 23085 23419 94414 94860 58868 59244 28172 28491 139369 140303 182687 183106 11541 12253 131950 132734 43029 43936 188677 189434 37409 38320 164140 164629 176377 17...
output:
yes
result:
ok single line: 'yes'
Test #45:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
100 10000 1599258 1610590 2145036 2158436 1950098 1960098 1408001 1418348 1750966 1761335 1965445 1975769 1377949 1387949 1435949 1445949 1329363 1344801 1468249 1481637 1854074 1864074 1035322 1048857 1089370 1099370 2163537 2176944 1280153 1291535 1705736 1715736 1097141 1110567 1012442 1022442 18...
output:
no
result:
ok single line: 'no'
Test #46:
score: 0
Accepted
time: 1ms
memory: 3812kb
input:
100 10000 1598906 1610953 2144691 2158786 1949964 1960226 1407662 1418685 1750607 1761693 1965100 1976126 1377934 1387965 1435822 1446092 1329011 1345153 1467859 1481985 1853941 1864199 1035008 1049166 1089243 1099499 2163188 2177282 1279818 1291880 1705581 1715899 1096786 1110896 1012247 1022629 18...
output:
yes
result:
ok single line: 'yes'
Test #47:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
100 10000 1599258 1610590 2145036 2158436 1950098 1960098 1408001 1418348 1750966 1761335 1965445 1975769 1377949 1387949 1435949 1445949 1329363 1344801 1468249 1481637 1854074 1864074 1035322 1048857 1089370 1099370 2163537 2176944 1280153 1291535 1705736 1715736 1097141 1110567 1012442 1022442 18...
output:
yes
result:
ok single line: 'yes'
Test #48:
score: 0
Accepted
time: 14ms
memory: 3948kb
input:
1000 100 124051 125187 171191 171336 224596 226225 123199 123391 245459 245589 213369 214010 102337 103456 247766 248024 240201 240587 124332 124717 200470 200696 240898 241509 188213 189342 109849 110972 135910 136023 193319 193453 220894 222030 229948 230572 120484 121733 159506 159761 171587 1717...
output:
yes
result:
ok single line: 'yes'
Test #49:
score: 0
Accepted
time: 14ms
memory: 3872kb
input:
1000 200 407844 408545 380918 383214 262738 262993 366274 366474 302376 303614 374077 374518 242960 243160 295619 295937 423975 424235 264694 264895 407770 407970 341001 342223 286896 287215 428628 428959 448025 452306 227232 228189 456731 456931 305555 305803 382512 384757 478767 478988 427795 4300...
output:
yes
result:
ok single line: 'yes'
Test #50:
score: 0
Accepted
time: 14ms
memory: 3608kb
input:
1000 200 202524 202959 427270 427958 258576 260808 460543 461749 276291 276491 203871 204071 212076 212771 402569 404023 440754 441005 482397 482597 342791 343015 332002 334256 324392 324667 378344 379030 266128 266358 309793 311028 356102 356600 256510 257844 431366 431566 379132 379565 387531 3887...
output:
yes
result:
ok single line: 'yes'
Test #51:
score: 0
Accepted
time: 630ms
memory: 4732kb
input:
9996 10 1 146 0 68 1 30 10 20 39 68 49 59 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 303 313 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #52:
score: 0
Accepted
time: 627ms
memory: 4568kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 48 58 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #53:
score: 0
Accepted
time: 629ms
memory: 4528kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 303 313 331 360 340 350 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #54:
score: 0
Accepted
time: 635ms
memory: 4760kb
input:
9996 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #55:
score: 0
Accepted
time: 625ms
memory: 4792kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 48 58 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 448 458 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #56:
score: 0
Accepted
time: 630ms
memory: 4576kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 48 58 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 448 458 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #57:
score: 0
Accepted
time: 628ms
memory: 4572kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 48 58 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #58:
score: 0
Accepted
time: 627ms
memory: 4596kb
input:
9996 10 1 146 0 68 1 30 10 20 39 68 49 59 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #59:
score: 0
Accepted
time: 629ms
memory: 4532kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 48 58 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #60:
score: 0
Accepted
time: 633ms
memory: 4732kb
input:
9996 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 380 390 408 437 417 427 439 584 438 506 439 468 448 458 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #61:
score: 0
Accepted
time: 631ms
memory: 4808kb
input:
10000 10 1 146 0 68 1 30 10 20 39 68 49 59 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 303 313 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 449 459 477 506 487 4...
output:
yes
result:
ok single line: 'yes'
Test #62:
score: 0
Accepted
time: 604ms
memory: 4576kb
input:
9990 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 380 390 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #63:
score: 0
Accepted
time: 603ms
memory: 4552kb
input:
9991 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 380 390 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
no
result:
ok single line: 'no'
Test #64:
score: 0
Accepted
time: 580ms
memory: 4484kb
input:
9796 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #65:
score: 0
Accepted
time: 584ms
memory: 4560kb
input:
9797 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
no
result:
ok single line: 'no'
Test #66:
score: 0
Accepted
time: 15ms
memory: 3608kb
input:
1000 100 184988 185906 159867 160525 40302 41276 84622 85590 84833 85746 9444 9871 2143 2588 1394 1976 189078 189750 71221 71800 154921 155295 48176 48633 23542 24316 122048 122746 111620 112225 5021 5559 73353 74021 88047 88903 187222 187808 29002 29684 14688 15555 14920 15494 94892 95890 32386 330...
output:
yes
result:
ok single line: 'yes'
Test #67:
score: 0
Accepted
time: 15ms
memory: 3740kb
input:
1000 100 136209 136629 10824 11295 172673 173124 182592 182897 85242 86232 135475 135796 134857 135305 117647 118267 54536 55530 99025 99769 27152 27798 109699 110118 88955 89585 15830 16312 14100 14683 43032 43630 82270 82745 48401 49109 136445 137147 45888 46686 129797 130731 66477 67366 197854 19...
output:
yes
result:
ok single line: 'yes'
Test #68:
score: 0
Accepted
time: 578ms
memory: 4592kb
input:
9825 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 449 459 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #69:
score: 0
Accepted
time: 579ms
memory: 4376kb
input:
9826 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 157 167 185 214 194 204 223 291 224 253 234 244 262 291 271 281 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 379 389 408 437 418 428 439 584 438 506 439 468 449 459 477 506 486 49...
output:
no
result:
ok single line: 'no'
Test #70:
score: 0
Accepted
time: 579ms
memory: 4756kb
input:
9785 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 303 313 331 360 340 350 369 437 370 399 380 390 408 437 417 427 439 584 438 506 439 468 449 459 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #71:
score: 0
Accepted
time: 579ms
memory: 4532kb
input:
9786 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 125 135 147 292 146 214 147 176 156 166 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 303 313 331 360 340 350 369 437 370 399 380 390 408 437 417 427 439 584 438 506 439 468 449 459 477 506 487 49...
output:
no
result:
ok single line: 'no'
Test #72:
score: 0
Accepted
time: 2ms
memory: 3948kb
input:
1000 50 56634 57224 71129 71944 78229 78317 103015 103086 109310 109424 62748 62956 70101 70160 58540 58606 72591 73152 91730 91783 92782 92866 86744 87320 77766 78073 121938 122370 52602 52652 118448 118625 85118 85182 68525 69087 66414 66542 109470 109777 73345 73401 62677 62761 110273 110400 1123...
output:
no
result:
ok single line: 'no'
Test #73:
score: 0
Accepted
time: 12ms
memory: 3592kb
input:
1000 5 6482 6488 7357 7369 10367 10394 5451 5474 10032 10051 5644 5715 8549 8620 11662 11682 7069 7152 9933 9946 9722 9853 8111 8180 11581 11624 7344 7364 5602 5623 7537 7604 8216 8299 5160 5292 8529 8535 8364 8385 11547 11553 6338 6533 7152 7158 6920 7003 11121 11133 11438 11585 7836 7968 9570 9583...
output:
yes
result:
ok single line: 'yes'
Test #74:
score: 0
Accepted
time: 14ms
memory: 3732kb
input:
1000 50 56634 57224 71129 71944 78229 78317 103015 103086 109310 109424 62748 62956 70101 70160 58540 58606 72591 73152 91730 91783 92782 92866 86744 87320 77766 78073 121938 122370 52602 52652 118448 118625 85118 85182 68525 69087 66414 66542 109470 109777 73345 73401 62677 62761 110273 110400 1123...
output:
yes
result:
ok single line: 'yes'
Test #75:
score: 0
Accepted
time: 3ms
memory: 3592kb
input:
1000 5 11791 11924 10413 10435 6713 6725 5994 5999 5109 5189 9921 10053 11654 11659 6796 6958 8062 8073 11909 11931 11998 12017 10418 10549 8819 8857 9064 9086 9014 9065 6344 6477 11155 11160 10506 10581 7396 7463 9279 9418 11271 11418 11525 11534 10034 10041 11352 11513 7655 7667 9360 9428 9478 960...
output:
no
result:
ok single line: 'no'
Test #76:
score: 0
Accepted
time: 10ms
memory: 3724kb
input:
1000 5 11791 11926 10413 10436 6713 6725 5994 5999 5108 5191 9921 10053 11653 11659 6795 6958 8062 8074 11909 11932 11998 12017 10418 10550 8818 8857 9064 9087 9014 9065 6344 6477 11154 11160 10506 10581 7396 7463 9279 9418 11271 11418 11523 11534 10034 10043 11351 11514 7655 7667 9360 9428 9477 960...
output:
yes
result:
ok single line: 'yes'
Test #77:
score: 0
Accepted
time: 12ms
memory: 3712kb
input:
1000 5 11791 11924 10413 10435 6713 6725 5994 5999 5109 5189 9921 10053 11654 11659 6796 6958 8062 8073 11909 11931 11998 12017 10418 10549 8819 8857 9064 9086 9014 9065 6344 6477 11155 11160 10506 10581 7396 7463 9279 9418 11271 11418 11525 11534 10034 10041 11352 11513 7655 7667 9360 9428 9478 960...
output:
yes
result:
ok single line: 'yes'
Test #78:
score: 0
Accepted
time: 414ms
memory: 5064kb
input:
10000 100 1777459 1777590 2334722 2334867 2067706 2067834 2323226 2329467 1867290 1867658 1204711 1204818 1642513 1642644 1407837 1408013 1928337 1930610 1189059 1189671 2409463 2411610 2329617 2333827 2482384 2482547 1807885 1809135 2031327 2031681 1875095 1875260 1980750 1980911 2298696 2302887 19...
output:
no
result:
ok single line: 'no'
Test #79:
score: 0
Accepted
time: 1341ms
memory: 4828kb
input:
10000 100 1777458 1777592 2334721 2334867 2067703 2067834 2323225 2329467 1867288 1867658 1204711 1204818 1642512 1642644 1407835 1408013 1928337 1930611 1189059 1189673 2409463 2411610 2329617 2333827 2482384 2482548 1807885 1809135 2031326 2031681 1875095 1875261 1980748 1980912 2298693 2302889 19...
output:
yes
result:
ok single line: 'yes'
Test #80:
score: 0
Accepted
time: 1334ms
memory: 4760kb
input:
10000 100 1777459 1777590 2334722 2334867 2067706 2067834 2323226 2329467 1867290 1867658 1204711 1204818 1642513 1642644 1407837 1408013 1928337 1930610 1189059 1189671 2409463 2411610 2329617 2333827 2482384 2482547 1807885 1809135 2031327 2031681 1875095 1875260 1980750 1980911 2298696 2302887 19...
output:
yes
result:
ok single line: 'yes'
Test #81:
score: 0
Accepted
time: 574ms
memory: 4548kb
input:
9804 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
no
result:
ok single line: 'no'
Test #82:
score: 0
Accepted
time: 597ms
memory: 4720kb
input:
9803 10 1 146 0 68 1 30 10 20 39 68 48 58 77 145 78 107 88 98 116 145 125 135 147 292 146 214 147 176 156 166 185 214 194 204 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 340 350 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'
Test #83:
score: 0
Accepted
time: 578ms
memory: 4472kb
input:
9790 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 487 49...
output:
no
result:
ok single line: 'no'
Test #84:
score: 0
Accepted
time: 583ms
memory: 4692kb
input:
9789 10 1 146 0 68 1 30 11 21 39 68 49 59 77 145 78 107 87 97 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 233 243 262 291 272 282 293 438 292 360 293 322 302 312 331 360 341 351 369 437 370 399 379 389 408 437 417 427 439 584 438 506 439 468 448 458 477 506 487 49...
output:
yes
result:
ok single line: 'yes'
Test #85:
score: 0
Accepted
time: 587ms
memory: 4536kb
input:
9799 10 1 146 0 68 1 30 10 20 39 68 49 59 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 234 244 262 291 272 282 293 438 292 360 293 322 303 313 331 360 340 350 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 486 49...
output:
no
result:
ok single line: 'no'
Test #86:
score: 0
Accepted
time: 576ms
memory: 4760kb
input:
9798 10 1 146 0 68 1 30 10 20 39 68 49 59 77 145 78 107 88 98 116 145 126 136 147 292 146 214 147 176 157 167 185 214 195 205 223 291 224 253 234 244 262 291 272 282 293 438 292 360 293 322 303 313 331 360 340 350 369 437 370 399 380 390 408 437 418 428 439 584 438 506 439 468 448 458 477 506 486 49...
output:
yes
result:
ok single line: 'yes'