QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#178017 | #5378. 匹配问题 | zhoukangyang# | 18 | 10ms | 17896kb | C++11 | 1.6kb | 2023-09-13 17:19:28 | 2024-07-04 01:56:21 |
Judging History
answer
#include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); i++)
#define R(i, j, k) for(int i = (j); i >= (k); i--)
#define ll long long
#define ull unsigned long long
#define sz(a) ((int) a.size())
#define vi vector<int>
#define me(a, x) memset(a, x, sizeof(a))
using namespace std;
const int N = 1 << 21, L = 5e5, mod = 998244353;
int n, la, lb;
int cnta[N], cntb[N];
int a[N], b[N];
multiset < int > st;
int mn[N], tag[N];
void add(int x, int L, int R, int l, int r, int val) {
if(l <= L && R <= r) {
tag[x] += val, mn[x] += val;
return ;
}
int mid = (L + R) >> 1;
if(l <= mid) add(x * 2, L, mid, l, r, val);
if(r > mid) add(x * 2 + 1, mid + 1, R, l, r, val);
mn[x] = min(mn[x * 2], mn[x * 2 + 1]) + tag[x];
}
int main () {
ios :: sync_with_stdio(false);
cin.tie (0); cout.tie (0);
cin >> n >> la >> lb;
L(i, 1, n) {
cin >> a[i];
}
L(i, 1, n) {
cin >> b[i];
}
sort(a + 1, a + n + 1);
sort(b + 1, b + n + 1);
L(i, 1, n)
add(1, 1, L, 1, min(a[i] + la, L), 1);
L(i, 1, n)
add(1, 1, L, 1, b[i], -1);
int pos = 1;
int ans = 0;
L(i, 1, n) {
while(pos <= n && a[pos] <= b[i]) {
st.insert(a[pos]);
++pos;
}
add(1, 1, L, 1, b[i], 1);
auto lw = st.lower_bound(b[i] - lb);
int win = 0;
if(lw != st.end()) {
add(1, 1, L, 1, min(*lw + la, L), -1);
if(mn[1] < 0) {
add(1, 1, L, 1, min(*lw + la, L), 1);
} else {
ans += 1;
win = 1;
st.erase(lw);
}
}
if(!win) {
add(1, 1, L, 1, min(*st.begin() + la, L), -1), st.erase(st.begin());
}
}
cout << ans << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 4
Accepted
Test #1:
score: 4
Accepted
time: 0ms
memory: 9848kb
input:
2 2 1 1 1 1 1
output:
2
result:
ok single line: '2'
Test #2:
score: 0
Accepted
time: 2ms
memory: 12284kb
input:
10 200000 100000 34181 300096 24293 22680 402306 193269 438170 254676 188147 73971 216849 477743 461911 135785 467234 278230 287107 223666 124173 135091
output:
7
result:
ok single line: '7'
Test #3:
score: 0
Accepted
time: 2ms
memory: 12340kb
input:
10 200000 50000 298370 136488 436143 52173 206095 140981 321188 407844 342157 193338 138374 383207 156748 442404 386749 492604 354156 229996 447123 418264
output:
5
result:
ok single line: '5'
Test #4:
score: 0
Accepted
time: 0ms
memory: 12316kb
input:
10 50000 30000 306273 53088 405351 218373 335275 277816 451436 105244 418031 83336 489843 323727 219514 102964 141689 337190 131790 312365 431836 413688
output:
5
result:
ok single line: '5'
Test #5:
score: 0
Accepted
time: 2ms
memory: 12436kb
input:
10 80000 60000 224299 63826 419731 459681 408367 139676 239118 115180 368327 179613 289195 106688 418781 143169 441337 255686 228353 373168 489321 173199
output:
10
result:
ok single line: '10'
Test #6:
score: 0
Accepted
time: 0ms
memory: 14288kb
input:
10 150000 80000 218617 21495 443909 77126 349241 169574 387539 106419 251533 138042 427196 237082 192262 56014 357102 109789 495939 197573 273744 498979
output:
7
result:
ok single line: '7'
Test #7:
score: 0
Accepted
time: 0ms
memory: 9868kb
input:
10 5 1 1 28 22 4 16 13 7 10 19 25 6 9 27 12 30 24 18 15 3 21
output:
0
result:
ok single line: '0'
Test #8:
score: 0
Accepted
time: 2ms
memory: 11800kb
input:
10 2 1 19 13 16 22 28 25 7 1 4 10 6 21 30 9 15 12 27 18 3 24
output:
0
result:
ok single line: '0'
Test #9:
score: 0
Accepted
time: 0ms
memory: 9796kb
input:
9 5 1 9 1 12 2 16 5 8 15 19 18 20 4 7 14 6 21 13 11
output:
3
result:
ok single line: '3'
Test #10:
score: 0
Accepted
time: 1ms
memory: 9924kb
input:
10 500000 1 13 1 16 4 22 7 10 28 25 19 9 3 30 18 24 15 6 20 27 12
output:
1
result:
ok single line: '1'
Test #11:
score: 0
Accepted
time: 2ms
memory: 11744kb
input:
3 2 1 1 2 3 3 4 5
output:
0
result:
ok single line: '0'
Test #12:
score: 0
Accepted
time: 1ms
memory: 9736kb
input:
10 500000 499999 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282 375282
output:
10
result:
ok single line: '10'
Subtask #2:
score: 14
Accepted
Dependency #1:
100%
Accepted
Test #13:
score: 14
Accepted
time: 0ms
memory: 13908kb
input:
100 200000 50000 216198 375994 364079 318600 289827 26059 302540 179976 362307 239456 310052 149745 283732 189278 465297 19986 492322 62889 399607 354136 103590 327594 335929 428453 474630 362205 113883 219196 488463 150086 144585 8342 98764 454065 282581 397786 274728 271563 326538 246226 384730 25...
output:
63
result:
ok single line: '63'
Test #14:
score: 0
Accepted
time: 3ms
memory: 13652kb
input:
100 200000 10000 480821 383273 197373 419379 37439 203333 299170 472531 243830 178320 365484 188981 414062 72193 411592 424204 340704 77915 241035 418858 18916 22153 349730 52029 216408 254012 239845 340707 326325 217780 49620 457023 424881 447611 180529 299451 97390 388124 62096 217848 229883 36748...
output:
50
result:
ok single line: '50'
Test #15:
score: 0
Accepted
time: 3ms
memory: 13516kb
input:
100 200000 5000 248114 369741 180383 287869 440522 23446 77242 341565 270689 231933 318395 106083 425489 353655 339921 86901 464488 473163 90027 262555 343418 64735 38062 128873 201978 157259 398800 244502 277724 193275 415958 252223 338307 425455 385803 408262 493113 470196 456942 87927 48611 13535...
output:
48
result:
ok single line: '48'
Test #16:
score: 0
Accepted
time: 0ms
memory: 13880kb
input:
100 100000 50000 486345 297886 26025 474314 100979 481518 11500 283550 332460 445057 17533 144840 221191 392737 115392 302986 454624 423360 16963 446798 30332 270733 1813 396977 352733 134622 233480 413553 229390 162339 373438 159455 456285 111216 188711 265590 452306 73 124816 278925 143310 283361 ...
output:
82
result:
ok single line: '82'
Test #17:
score: 0
Accepted
time: 0ms
memory: 14208kb
input:
100 100000 5000 439157 15849 342210 416475 203400 331705 267562 496741 5582 1527 80269 362890 93819 325171 471805 492364 426232 179298 212402 373335 320351 280366 363315 268413 180120 228943 308449 335872 155669 7017 449849 234951 12715 258464 24847 476960 498347 331138 484617 468028 15269 307198 34...
output:
43
result:
ok single line: '43'
Test #18:
score: 0
Accepted
time: 3ms
memory: 14176kb
input:
100 50000 5000 356138 75991 429667 167698 190384 320685 49056 231155 493359 58606 294380 305694 417163 211543 183439 211048 241022 110826 325734 464543 194473 243735 16536 155717 338096 404192 189355 169201 133506 495056 164315 116861 112397 262901 303833 236119 52989 331273 270007 359116 2070 25260...
output:
41
result:
ok single line: '41'
Test #19:
score: 0
Accepted
time: 0ms
memory: 14408kb
input:
100 50000 7000 278750 385984 434621 58472 322689 269436 245170 17244 456888 11920 210805 31811 289511 463364 155357 467516 459079 191267 396040 454082 460194 103191 92335 494144 114187 326720 309988 123829 214131 141758 455879 416627 2031 134103 431343 325594 81548 358209 273302 421176 259867 446631...
output:
46
result:
ok single line: '46'
Test #20:
score: 0
Accepted
time: 0ms
memory: 13508kb
input:
100 50000 10000 44671 199153 486351 64506 331287 386915 95122 54209 376550 139713 371612 188414 388792 75322 179157 370318 183962 317192 183394 351017 304929 390544 253896 334074 275884 159986 348155 8929 192946 258068 419481 63725 327275 244648 58851 289296 385871 201431 40630 255845 261638 230397 ...
output:
40
result:
ok single line: '40'
Test #21:
score: 0
Accepted
time: 0ms
memory: 13596kb
input:
100 30000 5000 370274 110702 441251 272581 129801 352167 122734 60816 261473 2126 292718 151986 8139 321067 83913 278084 103390 203161 32695 280737 164143 431372 197003 71699 61831 174258 38384 56872 419945 197154 204290 148171 337649 346984 294808 178731 381524 299625 285955 237110 425019 130281 24...
output:
36
result:
ok single line: '36'
Test #22:
score: 0
Accepted
time: 0ms
memory: 14124kb
input:
100 30000 8000 251366 436756 233765 308050 194657 435426 433129 386977 140841 136428 356400 496170 57335 389627 375625 184631 255361 454672 119519 334233 383164 157349 100449 15554 66998 57625 234164 79397 327508 375708 319035 322094 266219 56301 245907 52931 256785 32213 367928 157824 467045 49924 ...
output:
49
result:
ok single line: '49'
Test #23:
score: 0
Accepted
time: 0ms
memory: 14348kb
input:
100 20000 10000 214869 191290 19116 251609 491675 223459 457066 63933 189882 450667 343040 67504 433800 357884 11077 254264 429652 49101 262977 349432 333510 236391 383768 216721 363804 214450 456066 61650 170593 294394 37815 62425 405074 488694 194382 476654 123487 152483 247976 339464 430823 10631...
output:
65
result:
ok single line: '65'
Test #24:
score: 0
Accepted
time: 3ms
memory: 14488kb
input:
100 20000 5000 437462 329536 281051 49656 311386 383880 414050 304141 222086 464737 473489 111375 486227 33389 425895 173908 13428 333673 416322 248683 193081 170119 7585 258089 30268 462767 229201 424598 229857 498012 391803 83729 496967 399202 254599 55990 344248 65292 466212 268316 439263 329296 ...
output:
35
result:
ok single line: '35'
Test #25:
score: 0
Accepted
time: 3ms
memory: 14204kb
input:
100 20000 8000 186991 153145 224998 168406 333689 14632 43352 351492 312667 7271 450525 115816 251856 477325 64515 195920 60688 271020 155268 30582 63814 316250 14753 299856 424233 33441 328071 95459 447508 188164 355273 77339 155202 373087 447826 215904 212918 277562 304754 31015 4340 350427 250433...
output:
52
result:
ok single line: '52'
Test #26:
score: 0
Accepted
time: 0ms
memory: 13600kb
input:
100 20000 15000 44059 345504 396488 324911 213580 103158 409930 350640 488727 232174 193116 195392 481090 498251 410616 438595 455380 289496 327872 112377 139575 216353 343918 272424 127610 59561 247654 479113 123751 28485 333387 158487 420901 114134 490297 130126 23097 287176 146717 282195 283608 1...
output:
88
result:
ok single line: '88'
Test #27:
score: 0
Accepted
time: 3ms
memory: 14300kb
input:
100 8000 6000 300083 476523 482608 21733 28565 486450 130857 230311 413484 166500 162587 260465 293137 250677 91590 495361 213360 89633 310942 46372 284836 308066 312348 22024 254554 461569 41723 400947 197082 286616 390455 302256 462378 481962 455426 45603 457483 404009 279406 207812 461602 279234 ...
output:
78
result:
ok single line: '78'
Test #28:
score: 0
Accepted
time: 0ms
memory: 14372kb
input:
100 8000 3000 349688 110364 204130 261795 399833 443387 7687 397959 231285 426706 308452 125270 252485 405799 90 6212 392185 196397 230660 90964 309814 58734 321188 94974 274155 258035 133847 137190 142104 270143 419182 422564 131482 172427 436081 120129 165426 468786 292634 422791 107056 157405 394...
output:
47
result:
ok single line: '47'
Test #29:
score: 0
Accepted
time: 3ms
memory: 13948kb
input:
100 8000 5000 432732 28718 32127 157910 400081 293228 282303 467763 177603 377587 436200 15806 290625 208627 320226 295877 97340 275915 225419 227052 425917 326666 203460 408584 69791 222820 24515 254501 384537 56310 391749 32870 230072 142265 218590 430854 215072 28096 199398 235671 96365 493361 48...
output:
70
result:
ok single line: '70'
Test #30:
score: 0
Accepted
time: 0ms
memory: 13644kb
input:
100 20000 7500 265668 267070 51164 288683 360507 70115 344194 159434 288683 288683 118552 204469 495058 260491 455254 288683 161325 148274 141485 316912 356624 270993 288683 270981 456336 288683 494888 243289 454834 386616 288683 160061 288683 102794 309555 179758 414065 480849 415057 288683 204579 ...
output:
65
result:
ok single line: '65'
Test #31:
score: 0
Accepted
time: 0ms
memory: 12920kb
input:
100 40000 12000 148990 264865 225361 15902 148990 387814 368692 148990 358572 154517 148990 148990 148990 148990 114698 148990 148990 148990 461229 148990 148990 148990 447993 166967 63548 148990 375511 149289 148990 148990 497498 148990 442420 148990 168189 295994 148990 148990 326163 457297 148990...
output:
76
result:
ok single line: '76'
Test #32:
score: 0
Accepted
time: 0ms
memory: 9888kb
input:
100 5 1 220 274 166 49 133 19 7 91 40 67 286 73 142 58 229 13 280 31 295 199 100 43 97 217 190 202 139 1 79 172 148 283 127 178 181 64 25 16 253 37 151 154 268 85 4 223 106 103 61 298 112 22 130 214 211 28 193 115 289 163 169 196 226 121 184 82 76 55 265 124 109 52 157 262 241 247 235 205 238 88 70 ...
output:
0
result:
ok single line: '0'
Test #33:
score: 0
Accepted
time: 1ms
memory: 9868kb
input:
100 2 1 199 214 271 253 274 262 289 16 181 1 76 250 88 298 19 232 190 85 175 178 7 79 172 133 202 142 166 259 187 34 136 241 286 13 31 28 112 226 43 205 127 40 52 4 67 220 139 208 151 229 10 25 121 292 277 295 49 148 97 115 160 82 145 196 268 100 193 184 256 244 265 91 247 163 157 238 64 109 235 283...
output:
0
result:
ok single line: '0'
Test #34:
score: 0
Accepted
time: 1ms
memory: 9880kb
input:
99 5 1 226 120 145 2 40 222 71 134 194 92 93 103 152 89 106 163 58 110 187 44 169 211 156 176 29 215 37 65 148 219 183 47 127 173 43 197 124 117 205 180 33 201 99 135 82 1 208 79 149 128 142 64 198 9 190 113 5 229 75 19 212 72 170 159 61 50 177 36 100 218 78 12 131 162 51 26 141 57 16 23 155 107 191...
output:
33
result:
ok single line: '33'
Test #35:
score: 0
Accepted
time: 1ms
memory: 9900kb
input:
100 500000 1 292 154 187 4 52 286 91 172 250 118 121 133 196 298 136 211 76 142 241 58 217 271 202 226 37 277 49 85 190 283 235 61 163 223 55 253 160 151 265 232 43 259 127 175 106 1 268 103 193 166 184 82 256 13 244 145 7 295 97 25 274 94 220 205 79 64 229 46 130 280 100 16 169 208 67 34 181 73 22 ...
output:
1
result:
ok single line: '1'
Test #36:
score: 0
Accepted
time: 0ms
memory: 12924kb
input:
100 2000 500 418148 67772 425443 340480 340480 340480 340480 340480 340480 316215 294520 338888 340480 100549 115089 340480 107308 340480 340480 340480 340480 340480 174618 18800 340480 301568 340480 340480 340480 340480 232718 340480 340480 259501 295002 340480 340480 138230 340480 41270 340480 194...
output:
66
result:
ok single line: '66'
Test #37:
score: 0
Accepted
time: 0ms
memory: 13484kb
input:
100 2000 300 377953 322264 413478 413478 376432 413478 413478 334955 233334 66253 413478 304735 413478 413478 21922 413478 413478 413478 413478 161562 413478 413478 413478 413478 91165 413478 460936 413478 418372 262631 413478 352490 224110 276955 413478 191376 39467 56781 413478 413478 460179 41347...
output:
58
result:
ok single line: '58'
Test #38:
score: 0
Accepted
time: 0ms
memory: 13264kb
input:
100 1300 500 275326 32201 43613 32201 32201 32201 32201 32201 32201 32201 109685 32201 32201 32201 317745 32201 32201 32201 32201 32201 481269 100696 214472 32201 10494 38972 434257 258191 32201 32201 32201 330759 461123 184513 312960 401127 32201 32201 379885 150822 32201 44681 150926 402532 20978 ...
output:
66
result:
ok single line: '66'
Test #39:
score: 0
Accepted
time: 0ms
memory: 12948kb
input:
100 1300 300 105199 105199 135094 238839 105199 105199 105199 105199 105199 114122 190730 105199 105199 251539 438687 80445 105199 400921 105199 105199 105199 105199 105199 105199 105199 105199 431617 105199 105199 469254 123139 350126 6811 372888 360852 93084 199402 105199 105199 105199 105199 1051...
output:
65
result:
ok single line: '65'
Test #40:
score: 0
Accepted
time: 0ms
memory: 13464kb
input:
100 2000 80 332966 226626 332966 225313 332966 332966 183595 332966 233583 332966 379780 449197 366550 332966 174233 332966 309128 332966 332966 199315 332966 43405 406348 455211 332966 332966 332966 110679 311635 332966 332966 332966 487496 332966 385059 332966 223471 239312 387602 332966 332966 10...
output:
54
result:
ok single line: '54'
Test #41:
score: 0
Accepted
time: 0ms
memory: 13168kb
input:
100 2000 130 384497 481777 50122 20784 343979 343979 398541 259243 65525 110266 343979 343979 343979 248299 343979 343979 343979 343979 493144 343979 452004 343979 343979 343979 343979 343979 150234 377797 196132 343979 343979 29893 424743 69112 343979 343979 229115 343979 343979 450379 343979 42121...
output:
55
result:
ok single line: '55'
Test #42:
score: 0
Accepted
time: 3ms
memory: 13240kb
input:
100 1300 50 397272 101950 473518 17739 473518 473518 473518 468065 250285 473518 166170 473518 473518 184167 224701 193447 473518 473518 473518 318583 222407 473518 317358 473518 473518 473518 473518 14161 473518 473518 100624 473518 473518 176415 473518 113482 462613 473518 449088 473518 473518 259...
output:
50
result:
ok single line: '50'
Test #43:
score: 0
Accepted
time: 0ms
memory: 12820kb
input:
100 1300 100 435913 93884 217777 145492 145492 280703 145492 340217 43451 145492 145492 314747 351065 340743 145492 145492 145492 477577 145492 176153 145492 284890 13898 145492 432377 145492 145492 235162 219042 145492 488155 145492 145492 145492 467400 299157 145492 145492 145492 142783 145492 145...
output:
52
result:
ok single line: '52'
Test #44:
score: 0
Accepted
time: 2ms
memory: 12984kb
input:
100 2000 1000 131926 62202 165169 131926 131926 393587 7138 46568 131926 131926 131926 131926 396926 234879 131926 131926 131926 328546 131926 131926 37402 328699 300984 456035 160067 400781 65346 131926 131926 131926 179303 331672 131926 186742 131926 131926 131926 250103 131926 131926 131926 21872...
output:
73
result:
ok single line: '73'
Test #45:
score: 0
Accepted
time: 0ms
memory: 13216kb
input:
100 1300 700 459203 224768 459203 459203 459203 459203 459203 172480 209823 23 459203 459203 459203 459203 459203 203877 459203 459203 399243 459203 445094 390194 51075 459203 29023 459203 235059 315626 459203 459203 408210 300568 24624 459203 459203 223172 459203 397353 277240 459203 459203 459203 ...
output:
75
result:
ok single line: '75'
Test #46:
score: 0
Accepted
time: 2ms
memory: 11792kb
input:
3 2 1 1 2 3 3 4 5
output:
0
result:
ok single line: '0'
Test #47:
score: 0
Accepted
time: 0ms
memory: 9820kb
input:
100 500000 499999 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 176385 17...
output:
100
result:
ok single line: '100'
Subtask #3:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #48:
score: 37
Accepted
time: 3ms
memory: 17204kb
input:
5000 233332 10000 421792 375018 481154 336831 239001 405616 387728 193044 450941 324370 238058 90659 431129 164919 47539 459063 498299 50838 171390 288397 159733 478192 6313 157409 366112 335593 328170 245357 341333 328352 250456 17602 438402 281715 81204 117468 456833 337362 432232 186808 408980 44...
output:
2973
result:
ok single line: '2973'
Test #49:
score: 0
Accepted
time: 4ms
memory: 17648kb
input:
5000 200000 100000 463972 56767 110693 292681 499566 41997 404179 244788 168434 455510 181483 119385 230325 255774 31791 162590 237076 440750 144186 459644 25418 393933 200590 3860 419876 374095 174245 423036 434239 95121 302917 418831 446448 140289 346795 283524 124706 199600 65161 276828 239470 36...
output:
4969
result:
ok single line: '4969'
Test #50:
score: 0
Accepted
time: 9ms
memory: 17532kb
input:
5000 200000 50000 390962 366941 47056 264653 117656 198976 254472 398425 456087 371287 236591 2258 5679 403623 464839 39953 214394 225500 163063 21966 12942 99235 180052 145749 110806 243882 436329 212301 178355 385664 382160 165605 47030 280986 233711 244374 195242 101972 146181 395092 5192 211774 ...
output:
3742
result:
ok single line: '3742'
Test #51:
score: 0
Accepted
time: 4ms
memory: 16600kb
input:
5000 200000 5000 412170 439436 423195 109785 446995 279063 261657 305828 405878 469830 250956 310049 58169 123746 458586 322197 276326 297809 50860 400354 179442 405807 358054 240050 268671 87055 12503 2895 261404 412130 390958 1991 235872 371126 134045 359202 31136 180095 180545 363632 223780 35317...
output:
2909
result:
ok single line: '2909'
Test #52:
score: 0
Accepted
time: 4ms
memory: 17636kb
input:
5000 200000 2000 86255 269733 470311 241609 370510 121746 16392 175001 857 302917 22537 227703 238055 141526 55297 228844 494741 183338 85915 435314 161970 194007 314244 57427 477283 204491 274489 293563 251994 318878 194836 404172 403414 202276 160305 408009 307402 237847 469358 305925 313829 44507...
output:
2820
result:
ok single line: '2820'
Test #53:
score: 0
Accepted
time: 8ms
memory: 15828kb
input:
5000 200000 8000 55319 472639 257094 420744 97206 377271 144238 75067 282580 331367 98069 28481 323234 491424 429932 296328 309663 390086 299578 329614 318774 273824 431663 437020 277997 205917 449171 269254 96207 263888 305054 28236 176350 217017 418469 355861 140875 163612 39349 82422 192430 23006...
output:
2872
result:
ok single line: '2872'
Test #54:
score: 0
Accepted
time: 9ms
memory: 16868kb
input:
5000 200000 20000 364777 99315 204678 453818 247564 93495 277220 368164 358536 44339 219166 429748 65704 304360 179252 417418 209106 407076 291702 398044 444937 18482 273224 480051 47306 166303 437761 271816 491353 342394 329193 346156 372214 285652 57848 445253 391374 170311 475239 262609 383220 13...
output:
3087
result:
ok single line: '3087'
Test #55:
score: 0
Accepted
time: 8ms
memory: 16580kb
input:
5000 200000 40000 72067 110481 263797 36637 290527 402012 162424 277517 331046 473231 105780 386456 185137 236418 263441 185006 148716 423368 183813 37872 111666 226918 70103 74307 336942 5159 409237 57493 118722 367955 157865 743 132814 497385 411056 192241 63513 15724 220351 136307 310182 53927 25...
output:
3524
result:
ok single line: '3524'
Test #56:
score: 0
Accepted
time: 8ms
memory: 16104kb
input:
5000 100000 50000 102920 441021 140300 251197 293853 231473 279326 274320 126824 176024 368042 27936 19396 343134 190006 271901 107608 427720 418562 343604 11564 253791 462233 369046 437649 380683 400009 440122 257989 366851 34567 298271 298795 91732 55603 326997 278203 452272 74873 36827 149663 102...
output:
4888
result:
ok single line: '4888'
Test #57:
score: 0
Accepted
time: 4ms
memory: 17608kb
input:
5000 100000 5000 473763 116865 466007 147529 444751 158381 393699 85889 330439 396004 303283 4445 118318 46596 409166 89897 445084 187858 395557 422104 341560 370603 27103 497263 181064 411102 143981 115217 415359 61384 110414 341073 304073 274642 47110 206510 69678 240507 441496 405292 463064 41616...
output:
2786
result:
ok single line: '2786'
Test #58:
score: 0
Accepted
time: 3ms
memory: 17748kb
input:
5000 100000 2000 43548 272158 34671 252439 66145 386375 246273 56615 156058 47562 299199 31644 251665 221113 498334 65805 159449 53968 102856 157441 408288 88943 164156 123142 27117 393201 77127 266363 109450 111311 217449 27313 281000 364199 376408 287202 23578 173909 147899 264580 139168 142218 36...
output:
2698
result:
ok single line: '2698'
Test #59:
score: 0
Accepted
time: 5ms
memory: 16756kb
input:
5000 100000 8000 419995 119296 337902 470746 229116 340649 470876 498496 472717 96683 261124 260984 371991 238429 165943 132692 426756 109715 408045 363621 490458 380961 220755 433872 177738 250359 54218 197665 369973 298073 262499 102804 248019 171918 231185 350148 68209 452465 130881 350203 152260...
output:
2880
result:
ok single line: '2880'
Test #60:
score: 0
Accepted
time: 3ms
memory: 17148kb
input:
5000 100000 20000 331402 331507 396897 237358 153764 287567 7956 161038 465314 99515 327003 173845 117432 219850 32541 122560 253212 195102 22362 61766 425978 201996 342663 213437 47997 332716 168107 378825 291933 16618 412535 474929 7730 497258 98690 133416 238830 135699 61631 17675 175715 96074 33...
output:
3281
result:
ok single line: '3281'
Test #61:
score: 0
Accepted
time: 9ms
memory: 16572kb
input:
5000 100000 40000 327322 162909 132466 255759 417172 139794 72052 155630 65598 428083 289132 261492 318169 430123 356475 66706 344890 273251 339303 262439 220945 19698 264354 476734 1516 291854 387696 353722 11807 205602 196906 411932 222978 200551 267172 228569 230406 308868 262872 434985 22164 376...
output:
4231
result:
ok single line: '4231'
Test #62:
score: 0
Accepted
time: 4ms
memory: 16148kb
input:
5000 50000 5000 69026 208262 170986 68305 356687 264015 471340 447592 226233 318998 90722 201767 176971 278958 450079 124961 478942 286884 356392 114120 448595 475580 404523 215718 292196 182892 321391 143598 176260 340620 362421 319332 243386 246333 4454 396554 53025 241093 21696 156000 138251 1131...
output:
2803
result:
ok single line: '2803'
Test #63:
score: 0
Accepted
time: 3ms
memory: 16952kb
input:
5000 50000 2000 361766 217345 259095 495419 175387 31709 110220 164187 11681 85054 395431 135149 305834 176625 455726 159689 301690 299390 132113 35627 187421 29462 95083 72584 69408 177695 230285 353128 246763 371903 55747 70250 370263 319135 177728 171772 339003 210144 185259 209215 245358 439787 ...
output:
2649
result:
ok single line: '2649'
Test #64:
score: 0
Accepted
time: 4ms
memory: 16380kb
input:
5000 50000 8000 312531 287967 167638 126803 172266 242033 462787 331114 6169 301115 470650 494275 452868 330086 367809 84589 295957 21080 291903 452338 319314 478023 453121 231714 164547 112754 52761 175097 451457 379376 304072 231578 320601 391081 74521 133176 224230 50043 114041 432691 391664 1538...
output:
3037
result:
ok single line: '3037'
Test #65:
score: 0
Accepted
time: 4ms
memory: 16344kb
input:
5000 50000 20000 352343 444456 129455 63036 415631 405431 466537 342473 73146 80102 43126 499679 319403 261245 76721 264983 277802 489576 304115 69911 110120 150286 255062 381910 131570 189777 297781 338087 9913 309686 341014 465524 274999 497931 33541 346751 185370 94873 111072 19201 261981 272024 ...
output:
4119
result:
ok single line: '4119'
Test #66:
score: 0
Accepted
time: 4ms
memory: 17192kb
input:
5000 50000 40000 424107 164537 282708 485149 321650 88866 456420 106651 173479 11164 462137 116954 108534 62019 100990 467976 460384 264636 96576 112352 216158 295581 194102 51250 133396 271379 103107 2084 22443 318896 263284 380149 58258 296446 415694 26971 99671 38788 288414 381636 56956 367303 38...
output:
5000
result:
ok single line: '5000'
Test #67:
score: 0
Accepted
time: 6ms
memory: 16484kb
input:
5000 20000 5000 337272 340625 335483 210758 476956 333570 416793 199881 5845 73765 473389 243290 301723 302633 26074 229792 209037 56226 401299 84169 81845 178781 424003 134426 97015 293790 173214 164014 318916 429958 249354 265021 177108 74317 149985 284078 18215 890 217276 408727 397326 32214 4062...
output:
3246
result:
ok single line: '3246'
Test #68:
score: 0
Accepted
time: 3ms
memory: 16048kb
input:
5000 20000 2000 497025 413399 30446 118074 287662 400170 18984 353428 162406 404751 286934 45796 165002 147839 498299 185485 345381 203754 384237 491910 293619 252900 295664 27345 249875 358149 392380 84692 254186 145878 37747 403856 252329 4461 339818 241060 495922 89663 104042 491639 370932 198396...
output:
2700
result:
ok single line: '2700'
Test #69:
score: 0
Accepted
time: 6ms
memory: 16360kb
input:
5000 20000 8000 350913 18858 428681 33 58527 394946 379187 74094 363699 498320 204842 269122 220990 102538 94665 146593 110642 116922 231251 368022 403325 164638 37274 282168 206042 393002 322920 406754 349854 410957 273427 394393 438977 444757 354065 78841 359761 188774 5684 288484 171108 139292 44...
output:
4015
result:
ok single line: '4015'
Test #70:
score: 0
Accepted
time: 10ms
memory: 17800kb
input:
5000 20000 1000 472866 246458 18382 128253 379646 373796 57109 142428 185206 58553 372520 420556 57622 328272 376432 208664 149367 315792 224306 473081 135069 67999 75729 452060 63628 4242 424037 310609 433198 472362 244932 289569 408950 12383 292460 321100 201019 387870 423502 104770 215566 471878 ...
output:
2548
result:
ok single line: '2548'
Test #71:
score: -37
Wrong Answer
time: 8ms
memory: 17896kb
input:
5000 20000 5100 210281 76586 413032 355318 48105 264599 414001 285955 143233 76070 252998 233313 193397 409811 198437 123971 437408 384849 252813 203671 149156 174857 372939 125304 223737 359168 135243 125290 191729 336869 154749 172553 182685 185908 320897 103939 379486 185049 449638 218224 370998 ...
output:
result:
wrong output format Output file not found: ""
Subtask #4:
score: 0
Judgement Failed
Test #100:
score: 0
Judgement Failed
input:
500000 500000 10 200184 74991 71203 334998 316800 34483 120570 301054 331108 232072 189788 397143 490296 56807 361700 88818 42376 460305 371750 450351 338384 429789 426045 445029 152316 408919 188124 144966 457495 475025 225370 260510 383159 495247 54319 246245 240728 372033 439599 119720 449020 451...
output:
result:
Subtask #5:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%