QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#592157 | #7777. Intro: Dawn of a New Era | NKheyuxiang | TL | 795ms | 244956kb | C++14 | 2.8kb | 2024-09-26 20:59:13 | 2024-09-26 21:18:53 |
Judging History
answer
#include<bits/stdc++.h>
#define N 300005
using namespace std;
const int inf=1e9;
int n,rk[N],mx[N],srt[N],m;
struct node{
int mx,id;
}p[N];
bool cmp(node p1,node p2){
return p1.mx<p2.mx;
}
vector<int > a[N];
int h[N],to[N*5],nxt[N*5],w[N*5],cnt;
void jb(int u,int v,int W){
w[++cnt]=W;
to[cnt]=v;
nxt[cnt]=h[u];
h[u]=cnt;
}
void JB(int u,int v,int W){
jb(u,v,W);
jb(v,u,0);
}
int dis[N],ct[N],cur[N],k,s,t;
int dfs(int u,int fl){
if(u==t) return fl;
int dl=0;
for(int &i=cur[u];i!=0;i=nxt[i]){
int v=to[i];
if(dis[v]+1==dis[u]&&w[i]){
int tmp=dfs(v,min(w[i],fl-dl));
w[i]-=tmp;
w[i^1]+=tmp;
dl+=tmp;
if(dl==fl) return dl;
}
}
cur[u]=h[u];
ct[dis[u]]--;
if(ct[dis[u]]==0) dis[s]=k+1;
ct[++dis[u]]++;
return dl;
}
int work(){
for(int i=1;i<=k;i++) cur[i]=h[i];
int res=0;
ct[0]=k;
while(dis[s]<=k) res+=dfs(s,inf);
return res;
}
int id1[N],id2[N],vct[N];
int ansnxt[N],nop[N],lstp[N];
queue<int > q[N];
bool nox[N];
int main(){
cnt=1;
scanf("%d",&n);
for(int i=1,j,o;i<=n;i++){
scanf("%d",&j);
while(j--){
scanf("%d",&o);
a[i].push_back(o);
srt[++m]=o;
}
}
sort(srt+1,srt+m+1);
m=unique(srt+1,srt+m+1)-srt-1;
for(int i=1;i<=n;i++){
int len=a[i].size();
for(int j=0;j<len;j++){
a[i][j]=lower_bound(srt+1,srt+m+1,a[i][j])-srt;
mx[i]=max(mx[i],a[i][j]);
}
p[i].mx=mx[i];p[i].id=i;
}
sort(p+1,p+n+1,cmp);
for(int i=1;i<=n;i++) vct[p[i].mx]++;
s=n+1,t=k=n+2;
for(int i=1;i<=n;i++){
JB(s,i,1);
if(i>1&&p[i].mx==p[i-1].mx) JB(i,id2[p[i].mx],1);
else{
if(vct[p[i].mx]==1){
id1[p[i].mx]=++k;
JB(id1[p[i].mx],t,1);
}
else{
id1[p[i].mx]=++k;
id2[p[i].mx]=++k;
JB(id2[p[i].mx],id1[p[i].mx],vct[p[i].mx]-1);
JB(id1[p[i].mx],t,vct[p[i].mx]);
JB(i,id2[p[i].mx],1);
}
}
for(int v:a[p[i].id])
if(v!=p[i].mx&&id1[v]) JB(i,id1[v],1);
}
printf("%d\n",work());
for(int u=1;u<=n;u++){
int toid=-1;
for(int i=h[u];i!=0;i=nxt[i]){
int v=to[i];
if(v!=s&&w[i]==0) toid=v;
}
if(toid!=id2[p[u].mx])
q[id1[p[u].mx]].push(u);
}
for(int u=1;u<=n;u++){
int toid=-1;
for(int i=h[u];i!=0;i=nxt[i]){
int v=to[i];
if(v!=s&&w[i]==0) toid=v;
}
if(toid==id2[p[u].mx]) continue;
if(toid!=-1){
ansnxt[q[toid].front()]=u;
q[toid].pop();
}
lstp[p[u].mx]=u;
}
for(int u=1;u<=n;u++){
int toid=-1;
for(int i=h[u];i!=0;i=nxt[i]){
int v=to[i];
if(v!=s&&w[i]==0) toid=v;
}
if(toid==id2[p[u].mx]){
ansnxt[u]=ansnxt[lstp[p[u].mx]];
ansnxt[lstp[p[u].mx]]=u;
lstp[p[u].mx]=u;
}
}
for(int i=1;i<=n;i++)
if(ansnxt[i]!=0) nox[ansnxt[i]]=1;
for(int i=1;i<=n;i++){
if(nox[i]) continue;
printf("%d ",p[i].id);
int x=ansnxt[i];
while(x!=0){
printf("%d ",p[x].id);
x=ansnxt[x];
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 19ms
memory: 231720kb
input:
5 3 1 2 4 2 2 3 2 1 3 1 2 2 4 5
output:
3 4 1 5 2 3
result:
ok correct!
Test #2:
score: 0
Accepted
time: 36ms
memory: 227428kb
input:
3 1 1 1 2 1 3
output:
0 1 2 3
result:
ok correct!
Test #3:
score: 0
Accepted
time: 23ms
memory: 230124kb
input:
9 2 1 2 2 3 4 2 2 5 2 4 5 2 5 6 2 6 7 2 6 8 2 2 8 2 8 9
output:
7 1 8 7 9 2 4 3 5 6
result:
ok correct!
Test #4:
score: 0
Accepted
time: 31ms
memory: 228852kb
input:
20 2 17 18 2 19 20 2 3 4 2 11 12 2 20 21 2 14 15 2 4 5 2 12 13 2 7 8 2 13 14 2 1 2 2 8 9 2 15 16 2 6 7 2 5 6 2 18 19 2 16 17 2 10 11 2 9 10 2 2 3
output:
19 11 20 3 7 15 14 9 12 19 18 4 8 10 6 13 17 1 16 2 5
result:
ok correct!
Test #5:
score: 0
Accepted
time: 19ms
memory: 226308kb
input:
20 2 1 12 2 1 3 2 1 4 2 1 21 2 1 15 2 1 10 2 1 19 2 1 17 2 1 9 2 1 5 2 1 8 2 1 18 2 1 2 2 1 20 2 1 14 2 1 6 2 1 7 2 1 16 2 1 13 2 1 11
output:
0 13 2 3 10 16 17 11 9 6 20 1 19 15 5 18 8 12 7 14 4
result:
ok correct!
Test #6:
score: 0
Accepted
time: 36ms
memory: 225904kb
input:
20 2 20 21 2 6 20 2 11 20 2 13 14 2 18 21 2 15 21 2 10 16 2 7 8 2 1 12 2 12 18 2 7 20 2 5 12 2 18 21 2 4 14 2 12 17 2 12 16 2 16 19 2 7 12 2 10 18 2 11 14
output:
14 8 18 16 7 17 9 15 12 10 19 13 20 4 14 11 3 2 1 6 5
result:
ok correct!
Test #7:
score: 0
Accepted
time: 31ms
memory: 231072kb
input:
20 2 9 10 2 1 17 2 11 12 2 20 21 2 1 4 2 6 7 2 15 16 2 1 18 2 1 5 2 1 13 2 5 21 2 7 21 2 1 2 2 2 21 2 1 19 2 19 20 2 14 21 2 10 11 2 13 14 2 8 21
output:
10 13 14 5 9 11 6 12 1 18 3 10 19 17 7 2 8 15 16 4 20
result:
ok correct!
Test #8:
score: 0
Accepted
time: 28ms
memory: 230756kb
input:
20 2 4 6 2 11 16 2 9 15 2 10 14 2 20 21 2 10 20 2 8 10 2 3 19 2 3 18 2 16 18 2 4 14 2 14 18 2 20 21 2 13 21 2 19 21 2 15 21 2 7 12 2 4 16 2 20 21 2 20 21
output:
13 1 7 6 20 13 14 5 19 17 4 11 12 9 3 16 2 18 10 8 15
result:
ok correct!
Test #9:
score: 0
Accepted
time: 27ms
memory: 230748kb
input:
20 2 10 12 2 5 7 2 4 11 2 14 15 2 10 12 2 17 20 2 14 15 2 12 13 2 12 15 2 15 18 2 18 20 2 14 16 2 16 21 2 7 20 2 7 14 2 12 19 2 3 15 2 5 6 2 16 17 2 7 8
output:
12 18 2 15 12 13 20 3 5 9 7 17 4 10 11 1 16 8 19 6 14
result:
ok correct!
Test #10:
score: 0
Accepted
time: 36ms
memory: 228780kb
input:
20 2 8 21 2 7 20 2 15 21 2 18 21 2 17 19 2 10 15 2 8 14 2 5 19 2 16 21 2 3 8 2 5 8 2 7 11 2 12 21 2 6 13 2 10 13 2 16 21 2 7 14 2 12 15 2 18 20 2 19 21
output:
14 10 11 7 17 12 15 14 18 6 3 5 8 20 13 9 16 4 1 2 19
result:
ok correct!
Test #11:
score: 0
Accepted
time: 35ms
memory: 231404kb
input:
20 2 13 20 2 16 20 2 20 21 2 4 5 2 16 21 2 11 13 2 5 7 2 16 19 2 18 19 2 12 18 2 1 16 2 11 17 2 11 20 2 2 19 2 6 20 2 19 20 2 4 13 2 17 20 2 14 17 2 15 17
output:
15 4 7 17 6 1 13 15 2 11 5 20 19 12 18 10 9 8 14 16 3
result:
ok correct!
Test #12:
score: 0
Accepted
time: 36ms
memory: 226164kb
input:
20 2 15 17 2 10 19 2 9 11 2 19 20 2 2 17 2 15 17 2 17 18 2 1 13 2 16 17 2 4 13 2 4 9 2 11 21 2 8 17 2 8 21 2 16 17 2 5 21 2 1 2 2 2 6 2 8 20 2 18 21
output:
15 17 5 1 6 9 13 15 7 20 14 16 18 11 3 12 8 10 2 4 19
result:
ok correct!
Test #13:
score: 0
Accepted
time: 32ms
memory: 229832kb
input:
20 2 4 16 2 11 18 2 16 18 2 20 21 2 18 21 2 13 18 2 15 17 2 3 13 2 16 19 2 3 19 2 13 20 2 9 19 2 19 21 2 8 12 2 10 14 2 12 18 2 11 20 2 11 16 2 16 20 2 17 20
output:
15 14 16 2 3 6 5 8 11 19 17 15 1 18 9 10 12 13 7 20 4
result:
ok correct!
Test #14:
score: 0
Accepted
time: 38ms
memory: 231108kb
input:
20 2 7 20 2 5 18 2 12 19 2 3 12 2 13 19 2 1 2 2 11 19 2 19 21 2 5 16 2 12 14 2 3 20 2 17 19 2 20 21 2 1 2 2 3 18 2 14 16 2 2 11 2 12 13 2 10 14 2 3 19
output:
15 6 14 17 7 8 4 18 5 20 12 3 19 10 16 9 2 15 11 1 13
result:
ok correct!
Test #15:
score: 0
Accepted
time: 27ms
memory: 230748kb
input:
20 2 7 11 2 11 17 2 9 21 2 1 2 2 15 19 2 9 21 2 1 10 2 7 19 2 17 21 2 15 17 2 7 9 2 20 21 2 1 5 2 14 17 2 14 21 2 10 21 2 6 20 2 7 9 2 4 6 2 17 18
output:
13 4 13 19 17 12 18 11 6 7 16 9 15 3 1 2 14 10 20 8 5
result:
ok correct!
Test #16:
score: 0
Accepted
time: 27ms
memory: 228284kb
input:
20 2 10 17 2 11 21 2 4 13 2 17 20 2 18 20 2 1 21 2 4 19 2 11 21 2 1 20 2 20 21 2 7 15 2 1 3 2 18 21 2 20 21 2 15 16 2 14 18 2 8 14 2 6 16 2 17 21 2 10 16
output:
14 12 3 17 16 5 9 4 10 11 15 20 18 1 19 8 6 13 14 2 7
result:
ok correct!
Test #17:
score: 0
Accepted
time: 36ms
memory: 228592kb
input:
1000 2 926 927 2 660 661 2 142 143 2 43 44 2 199 200 2 80 81 2 132 133 2 614 615 2 500 501 2 173 174 2 804 805 2 22 23 2 358 359 2 553 554 2 974 975 2 31 32 2 969 970 2 847 848 2 857 858 2 284 285 2 244 245 2 649 650 2 84 85 2 890 891 2 382 383 2 575 576 2 936 937 2 858 859 2 921 922 2 211 212 2 327...
output:
999 248 712 884 682 508 455 916 411 403 992 128 828 690 628 959 497 324 639 898 272 960 12 542 760 663 709 596 998 95 963 16 815 900 745 374 664 243 896 700 832 77 448 4 333 568 829 49 308 679 420 984 479 490 133 487 680 186 659 395 811 290 797 199 307 350 718 620 742 874 314 426 294 886 518 351 972...
result:
ok correct!
Test #18:
score: 0
Accepted
time: 28ms
memory: 229528kb
input:
1000 2 1 23 2 1 983 2 1 460 2 1 171 2 1 34 2 1 516 2 1 437 2 1 823 2 1 546 2 1 37 2 1 914 2 1 609 2 1 757 2 1 96 2 1 39 2 1 646 2 1 574 2 1 443 2 1 651 2 1 257 2 1 557 2 1 533 2 1 213 2 1 611 2 1 787 2 1 238 2 1 896 2 1 552 2 1 850 2 1 714 2 1 61 2 1 218 2 1 179 2 1 192 2 1 836 2 1 568 2 1 279 2 1 3...
output:
0 434 720 736 557 375 161 404 945 806 891 833 866 900 598 271 338 908 923 795 408 329 1 632 489 703 949 305 235 339 515 182 183 5 152 308 10 432 15 906 589 195 263 874 640 518 870 135 173 850 146 532 920 332 122 647 748 868 722 429 31 592 909 168 63 458 352 97 90 240 108 665 134 513 277 106 355 399 ...
result:
ok correct!
Test #19:
score: 0
Accepted
time: 24ms
memory: 231128kb
input:
1000 2 322 639 2 960 978 2 28 258 2 891 900 2 121 546 2 768 792 2 330 497 2 290 711 2 752 932 2 145 148 2 978 1000 2 96 644 2 326 892 2 292 961 2 285 348 2 312 858 2 222 509 2 342 944 2 305 361 2 266 831 2 521 906 2 701 908 2 238 473 2 345 589 2 899 932 2 4 490 2 780 905 2 786 790 2 952 956 2 170 55...
output:
759 59 606 529 12 617 715 825 540 925 381 386 173 627 230 797 311 50 128 349 567 742 832 962 884 233 771 319 10 609 517 703 124 496 915 216 292 270 8 978 818 912 187 30 809 669 562 375 574 100 495 987 842 423 931 675 840 956 957 204 594 549 590 663 346 237 179 532 659 691 368 89 61 969 199 584 267 1...
result:
ok correct!
Test #20:
score: 0
Accepted
time: 43ms
memory: 228740kb
input:
1000 2 1 534 2 628 1001 2 498 1001 2 1 107 2 355 1001 2 1 313 2 756 1001 2 800 801 2 816 1001 2 972 1001 2 793 794 2 1 484 2 653 1001 2 1 664 2 920 921 2 992 993 2 1 931 2 1 576 2 1 761 2 1 682 2 835 1001 2 196 1001 2 1 608 2 790 1001 2 1 424 2 1 9 2 901 902 2 77 78 2 907 908 2 1 700 2 1 59 2 1 379 ...
output:
541 900 274 264 254 313 964 113 26 624 901 451 667 675 923 423 991 286 270 870 536 946 696 546 644 317 999 909 662 289 191 614 153 808 830 911 867 280 72 958 707 248 152 412 69 176 616 405 335 262 45 927 604 161 936 668 31 770 205 829 772 305 52 980 221 245 819 207 151 850 266 442 74 28 475 483 669 ...
result:
ok correct!
Test #21:
score: 0
Accepted
time: 35ms
memory: 231412kb
input:
1000 2 507 536 2 995 999 2 447 844 2 673 963 2 236 608 2 621 897 2 622 748 2 984 991 2 219 719 2 40 994 2 643 717 2 642 754 2 812 867 2 42 369 2 659 998 2 307 359 2 366 816 2 270 441 2 86 216 2 918 929 2 433 651 2 622 927 2 162 416 2 422 593 2 329 575 2 925 948 2 841 869 2 339 576 2 178 342 2 548 79...
output:
749 617 591 788 374 526 933 303 658 588 469 616 61 871 295 157 136 44 553 386 958 997 649 318 980 333 19 577 590 75 701 383 961 286 688 744 245 419 408 760 411 998 748 894 331 70 888 306 816 732 979 274 903 385 831 502 474 52 585 709 182 138 865 964 884 778 620 118 249 197 789 2 460 906 807 335 595 ...
result:
ok correct!
Test #22:
score: 0
Accepted
time: 40ms
memory: 231152kb
input:
1000 2 9 630 2 20 209 2 886 910 2 229 395 2 775 876 2 53 785 2 116 539 2 541 947 2 440 878 2 348 541 2 62 72 2 185 207 2 457 478 2 876 943 2 289 828 2 199 569 2 750 866 2 350 859 2 449 1000 2 614 919 2 159 576 2 860 863 2 523 640 2 90 673 2 678 695 2 195 297 2 952 968 2 755 932 2 551 884 2 585 778 2...
output:
742 411 529 382 525 11 352 745 834 950 153 54 205 559 321 40 699 63 372 678 396 120 895 568 843 67 41 706 144 5 14 183 661 182 677 117 781 880 928 236 836 576 170 560 943 226 994 701 750 397 392 12 980 199 555 49 370 395 887 988 25 2 916 340 791 846 98 376 743 674 637 924 697 219 952 655 538 218 210...
result:
ok correct!
Test #23:
score: 0
Accepted
time: 28ms
memory: 229928kb
input:
1000 2 122 559 2 498 582 2 639 837 2 162 165 2 322 953 2 304 435 2 769 823 2 407 841 2 885 901 2 5 453 2 991 996 2 191 824 2 418 614 2 233 251 2 76 850 2 762 988 2 45 265 2 810 932 2 14 546 2 152 731 2 901 980 2 426 761 2 120 555 2 414 940 2 919 931 2 30 622 2 217 814 2 897 979 2 197 879 2 567 923 2...
output:
748 119 303 127 688 918 932 680 45 658 222 18 471 804 34 331 82 674 223 79 160 754 23 101 419 293 686 743 292 654 644 785 75 938 518 455 615 318 354 694 778 347 340 446 158 496 259 837 307 850 47 829 717 284 493 780 254 819 494 690 953 4 137 568 609 585 420 64 538 843 689 589 749 150 653 803 275 807...
result:
ok correct!
Test #24:
score: 0
Accepted
time: 32ms
memory: 228324kb
input:
1000 2 512697359 512774760 2 648164742 651715810 2 87626639 88106897 2 23746611 24188540 2 612369762 612453612 2 657545784 658170997 2 356463524 356849621 2 183720601 183734922 2 638606521 639379351 2 368881937 369615994 2 267253191 267995026 2 20605282 22822236 2 412174893 413053221 2 44459170 4470...
output:
999 535 176 467 282 495 466 353 550 470 604 906 568 710 19 868 748 701 57 334 849 656 636 128 587 873 622 459 146 12 76 692 4 108 159 659 314 996 826 967 920 551 411 624 973 192 431 812 225 25 553 647 227 573 687 594 752 390 613 274 536 558 725 841 330 888 53 420 988 629 59 951 14 252 58 468 190 97 ...
result:
ok correct!
Test #25:
score: 0
Accepted
time: 41ms
memory: 229172kb
input:
1000 2 689110 123618662 2 689110 377706241 2 689110 336058146 2 689110 420597240 2 689110 601454368 2 689110 217406459 2 689110 480517810 2 689110 123853154 2 689110 512642478 2 689110 434665274 2 689110 147499673 2 689110 502900373 2 689110 512082915 2 689110 528921552 2 689110 485324937 2 689110 4...
output:
0 162 561 401 559 786 72 69 380 439 671 725 115 906 169 718 612 986 460 547 462 331 770 663 477 414 785 778 977 239 576 355 53 889 498 661 656 258 203 58 583 727 548 501 373 505 183 118 748 91 235 210 487 318 345 139 597 359 892 59 109 497 187 704 449 873 899 845 696 956 314 21 83 858 99 698 266 539...
result:
ok correct!
Test #26:
score: 0
Accepted
time: 35ms
memory: 228568kb
input:
1000 2 13182656 97097493 2 534040646 686390939 2 15317349 798031669 2 12527965 844489633 2 571878710 942801249 2 209452489 642245523 2 309202234 665709291 2 452019901 817215335 2 213188968 660531281 2 236377020 719458791 2 885520813 929279023 2 789242396 954981032 2 728381185 905330516 2 930178744 9...
output:
629 220 1 957 524 544 374 486 735 757 126 715 382 60 173 461 587 332 773 800 982 324 531 864 515 429 786 361 162 142 881 812 135 797 224 300 719 100 520 216 438 561 763 845 842 67 445 801 897 391 459 48 751 741 80 494 443 772 305 188 714 335 72 307 45 353 57 604 590 21 972 887 713 994 287 641 960 39...
result:
ok correct!
Test #27:
score: 0
Accepted
time: 43ms
memory: 231152kb
input:
1000 2 234530151 645041705 2 541508343 541790009 2 475415737 477831954 2 403318 414196892 2 201373810 202813283 2 403318 101085488 2 249234594 645041705 2 403318 77381550 2 361905218 645041705 2 403318 46490445 2 126508755 645041705 2 403318 155549446 2 173971388 645041705 2 604500868 607164086 2 40...
output:
540 111 186 995 470 189 441 164 591 382 453 141 557 632 363 370 271 61 137 577 227 903 45 920 738 315 465 394 292 776 351 772 323 775 457 403 630 305 652 36 836 633 587 492 796 886 350 483 973 585 679 716 850 943 280 767 101 604 188 176 878 148 34 132 127 720 228 849 779 479 10 638 892 306 269 459 1...
result:
ok correct!
Test #28:
score: 0
Accepted
time: 32ms
memory: 231220kb
input:
1000 2 617243117 868238738 2 581179245 814192846 2 601381485 694795618 2 492520629 928681111 2 36607223 342636773 2 465170385 744208961 2 894226642 917965440 2 955758812 971948546 2 228214222 610889618 2 232507617 601381485 2 471311352 693868162 2 501068095 832083539 2 876843796 981863378 2 47083364...
output:
630 122 239 298 39 120 982 914 722 160 684 731 651 759 124 305 635 656 788 303 864 470 155 268 586 165 599 219 829 186 929 354 460 705 963 408 850 461 534 826 899 622 566 37 188 951 64 134 41 434 698 502 162 488 795 608 760 235 511 7 602 830 856 546 73 417 561 811 601 828 989 845 10 3 660 123 551 20...
result:
ok correct!
Test #29:
score: 0
Accepted
time: 51ms
memory: 228328kb
input:
1000 2 920901423 974010612 2 815808463 828407660 2 481347895 556221528 2 182460512 634505113 2 831483943 976133598 2 105815699 379285207 2 674221624 905477702 2 399113592 620489963 2 62016516 214067254 2 527579867 955151402 2 830675962 883173856 2 948490774 964039399 2 173305694 213392181 2 30615226...
output:
646 15 689 206 338 253 411 466 761 927 467 932 473 633 640 497 625 769 31 544 207 28 357 107 393 217 938 886 599 728 228 794 712 483 549 430 705 109 481 967 902 637 100 653 543 741 399 907 888 356 13 9 548 887 674 413 840 154 815 514 685 785 488 312 354 265 874 339 21 22 390 936 243 389 581 216 172 ...
result:
ok correct!
Test #30:
score: 0
Accepted
time: 44ms
memory: 231324kb
input:
1000 2 335179329 834946514 2 283244947 828406291 2 194193951 833817416 2 228853987 645842676 2 535125948 537666192 2 535369179 561139451 2 694701107 855227705 2 937751529 996625109 2 58635182 83954819 2 337719556 499663115 2 805571812 881156579 2 449637409 904707632 2 853294998 898929900 2 19747035 ...
output:
633 252 311 443 926 209 294 821 103 967 317 177 354 309 76 475 738 664 858 9 684 823 960 34 532 732 709 683 98 436 875 906 881 764 338 285 527 431 490 466 691 653 179 609 166 717 870 673 282 714 795 514 396 456 552 238 44 286 90 115 14 432 910 536 437 892 958 704 982 942 598 578 606 904 947 802 445 ...
result:
ok correct!
Test #31:
score: 0
Accepted
time: 108ms
memory: 241732kb
input:
100000 2 48459 48460 2 21895 21896 2 6640 6641 2 47086 47087 2 83937 83938 2 52096 52097 2 82721 82722 2 88798 88799 2 11916 11917 2 7382 7383 2 35078 35079 2 33960 33961 2 53910 53911 2 43673 43674 2 63314 63315 2 80238 80239 2 67146 67147 2 91456 91457 2 22355 22356 2 51033 51034 2 26479 26480 2 7...
output:
99999 76245 10773 13043 32899 88895 46371 81501 62284 4343 84490 94666 85913 12895 73843 51288 52503 8144 94154 30812 38356 91034 7625 28753 58842 5341 39356 93437 86033 53541 15209 43076 71407 81913 26821 46869 6551 89893 92879 88841 76700 54831 31493 42533 29537 48441 8495 21655 94082 39405 20952 ...
result:
ok correct!
Test #32:
score: 0
Accepted
time: 83ms
memory: 239532kb
input:
100000 2 1 81053 2 1 16517 2 1 90983 2 1 99752 2 1 85811 2 1 25069 2 1 93076 2 1 53744 2 1 53964 2 1 76157 2 1 60365 2 1 72282 2 1 86306 2 1 30379 2 1 50838 2 1 3764 2 1 75120 2 1 90708 2 1 2490 2 1 43799 2 1 77311 2 1 82055 2 1 8538 2 1 54162 2 1 56356 2 1 47484 2 1 9616 2 1 71534 2 1 68712 2 1 945...
output:
0 75333 39928 47811 67873 60774 32626 72485 12188 67181 5293 39465 90507 35566 69394 27866 13634 58733 66403 52861 60104 25487 81178 25564 79536 75143 67379 39735 78900 6304 25715 30297 49552 95857 93874 10059 28353 96609 92493 59976 61050 15280 53907 72307 21747 24655 44362 38464 91231 20668 84128 ...
result:
ok correct!
Test #33:
score: 0
Accepted
time: 215ms
memory: 241524kb
input:
100000 2 12000 54652 2 28351 79538 2 94360 94937 2 61977 85064 2 86167 86510 2 72079 81388 2 27376 95608 2 86518 89067 2 40238 45556 2 14542 19339 2 15897 35460 2 48661 50646 2 14032 44400 2 64328 70815 2 25376 99199 2 91299 95405 2 14847 99126 2 10716 70170 2 40377 72895 2 55068 87277 2 93035 95045...
output:
74529 69041 45805 42770 82789 49517 90793 61504 68798 36638 64344 54664 35479 90702 40426 86712 45614 27899 65581 17009 27759 7306 9974 97722 56913 14511 68614 95510 87228 41617 85230 77270 40135 62755 19841 85054 10134 43148 77528 52235 48032 36934 995 67352 38511 24932 51870 67879 1067 28699 39759...
result:
ok correct!
Test #34:
score: 0
Accepted
time: 111ms
memory: 241472kb
input:
100000 2 1 12317 2 23106 100001 2 1 33767 2 47015 47016 2 74948 74949 2 1 27200 2 11084 11085 2 73463 100001 2 97529 97530 2 61168 100001 2 21246 21247 2 88781 100001 2 93455 100001 2 1 56715 2 1 59545 2 1 6644 2 61725 100001 2 37111 100001 2 1 59337 2 1 27135 2 42453 42454 2 5800 5801 2 22556 10000...
output:
55541 25761 54992 53526 43465 71704 87364 24895 21036 91946 12093 58625 65429 70884 22207 36737 31776 16850 63872 51832 74665 56146 79916 35897 58185 17267 4203 99087 48782 99396 16226 47861 90885 64804 30015 79251 95093 73619 1586 37185 340 87339 31386 57483 62657 96449 64588 2333 44361 16602 1195 ...
result:
ok correct!
Test #35:
score: 0
Accepted
time: 206ms
memory: 241652kb
input:
100000 2 42752 67631 2 97619 99412 2 64028 86492 2 60998 70996 2 71786 93438 2 74951 96860 2 78201 95252 2 51711 99890 2 5829 50791 2 79409 96439 2 70369 80364 2 95323 98450 2 23734 79022 2 49533 88776 2 63407 97283 2 10732 57041 2 5829 74062 2 61731 64329 2 10911 94555 2 41146 50147 2 91823 98918 2...
output:
74424 77402 5548 75630 37842 25775 5017 3114 22732 27866 25657 30837 40383 71947 72386 88710 90705 64797 79044 53181 70315 88692 13277 7562 89739 91965 87490 20327 8684 96694 26927 95514 33227 59417 32404 61384 96487 53681 55772 17067 14696 22081 96862 9982 12011 1001 56003 2211 11487 26903 93374 85...
result:
ok correct!
Test #36:
score: 0
Accepted
time: 210ms
memory: 244540kb
input:
100000 2 13580 57952 2 88073 92336 2 40003 60273 2 37350 75834 2 33426 77751 2 44240 70645 2 4562 89897 2 79260 84075 2 11747 41473 2 27445 62209 2 67647 82594 2 64358 83057 2 56322 85247 2 63242 78982 2 91834 98455 2 66044 82898 2 73126 79954 2 54564 90545 2 36449 43667 2 53768 82955 2 33846 77078 ...
output:
74529 71475 54534 95137 84765 59916 27222 8108 79209 49567 34785 36673 57265 80426 41339 89031 35494 36322 22489 64531 18171 57309 36425 64075 96199 38477 67699 89828 51917 29069 80782 61336 78598 59641 27325 29061 82508 2011 54495 49108 80335 85388 20616 31522 18754 62608 41309 30350 17554 49779 95...
result:
ok correct!
Test #37:
score: 0
Accepted
time: 197ms
memory: 243140kb
input:
100000 2 40228 81714 2 99713 99721 2 7259 32553 2 18515 59727 2 98969 99914 2 46923 54347 2 79489 99191 2 15790 28131 2 48637 70550 2 96452 97070 2 24912 25734 2 64363 77764 2 44429 68433 2 34796 74713 2 15622 35045 2 68822 73956 2 66344 93338 2 92871 97507 2 23587 80300 2 17611 74039 2 40450 94231 ...
output:
74416 87188 1087 38319 1020 55964 33255 7822 54896 73026 29749 33895 97175 4572 78073 54692 3811 28418 28286 97911 66643 77446 80790 58361 60966 53452 28531 5216 70402 470 36465 17290 60437 89434 43293 40650 90263 93466 20153 10577 35684 23956 4461 31980 7043 89131 41708 42327 59053 81083 16961 5722...
result:
ok correct!
Test #38:
score: 0
Accepted
time: 112ms
memory: 241836kb
input:
100000 2 596401419 596405347 2 31587562 31592900 2 253158848 253160067 2 654443478 654446953 2 260834303 260852020 2 461648137 461649937 2 61561195 61577827 2 116053155 116061032 2 476740816 476745660 2 598420085 598429594 2 453346816 453350408 2 494568528 494573032 2 487089527 487095168 2 247840352...
output:
99999 51068 49529 80796 86045 80411 33244 38458 29503 99284 34822 55740 34760 95335 97116 6336 44896 19267 38031 7300 36825 16575 53904 65563 72640 97880 35536 2904 84368 80065 15652 79218 85718 22663 83261 73079 51728 39760 3809 23097 58070 19815 23192 97961 81937 27021 72968 22487 70564 97702 2065...
result:
ok correct!
Test #39:
score: 0
Accepted
time: 89ms
memory: 238968kb
input:
100000 2 3142 140849999 2 3142 486848036 2 3142 99305595 2 3142 369542113 2 3142 130549827 2 3142 230567267 2 3142 114486183 2 3142 324385142 2 3142 523190768 2 3142 182822411 2 3142 287473472 2 3142 174863271 2 3142 418615430 2 3142 465179581 2 3142 5921085 2 3142 88494543 2 3142 279235795 2 3142 2...
output:
0 16720 37737 74113 76387 93322 15116 88160 6929 46117 69858 85524 91719 67407 43502 56044 9319 10830 433 57063 30697 75129 66878 64469 37613 12288 27752 368 50189 94370 43189 73431 3691 76395 77806 70771 96730 89713 37667 5539 72783 47316 51102 43333 99827 67494 47206 72412 93283 17234 42942 5151 2...
result:
ok correct!
Test #40:
score: 0
Accepted
time: 175ms
memory: 243256kb
input:
100000 2 237338344 652431151 2 773245782 995378876 2 524649543 738613984 2 366725068 885223820 2 810051474 872050776 2 972414208 992417952 2 883113760 888004022 2 155856635 723951012 2 421288306 886375493 2 5941848 229186961 2 416886098 673867373 2 157517412 371117347 2 849355506 895553328 2 2439590...
output:
63743 25687 80285 90517 88740 52280 50936 36871 48995 40241 45823 86020 57258 16696 10894 72428 72379 69449 91637 68833 84205 83744 15164 81138 61759 27039 2614 71774 58645 37581 70040 2768 3330 65657 75535 8926 26120 53848 37642 85851 77573 82933 1962 36765 1379 78037 30025 94685 15225 30009 58772 ...
result:
ok correct!
Test #41:
score: 0
Accepted
time: 104ms
memory: 240688kb
input:
100000 2 43890701 43901592 2 568 218118988 2 206823285 206829134 2 568 205642395 2 500741974 666071483 2 202032425 202033556 2 515527059 666071483 2 622229455 666071483 2 568 582113592 2 568 262721376 2 587512551 666071483 2 568 577191215 2 445248200 445248571 2 352847796 352857605 2 249588493 24959...
output:
55511 57181 62313 41328 95112 35111 27829 57148 6334 85215 78859 97048 34498 76941 98663 68826 62472 67244 72666 89211 36114 18430 60677 75111 19216 75426 74204 5812 24399 79312 2164 18764 52311 18674 85329 62212 9063 74242 89298 86139 32314 55911 45838 68329 11191 34161 33991 42061 89217 42786 2353...
result:
ok correct!
Test #42:
score: 0
Accepted
time: 191ms
memory: 244956kb
input:
100000 2 686849852 746248482 2 732526813 779294820 2 376786021 843151433 2 269957600 973473231 2 320069829 505476437 2 249208181 260879541 2 61651079 246358579 2 608000514 842597830 2 261154673 733548353 2 774471763 954541503 2 108045354 975764876 2 864725035 945036602 2 161286600 912396559 2 548794...
output:
63820 5927 7043 81345 30921 72599 48880 89068 16709 48042 91767 34634 11251 45164 78178 92233 83740 63871 69454 84491 22461 6493 94154 29928 37897 31806 17961 11077 60732 40346 82333 67201 83999 22541 14197 61834 83276 82650 53510 77589 42031 43368 41229 17535 19458 68555 92085 61841 95692 28569 890...
result:
ok correct!
Test #43:
score: 0
Accepted
time: 163ms
memory: 242396kb
input:
100000 2 702221799 829527113 2 594154243 730679644 2 698097756 958906217 2 790137799 913317707 2 301657172 552073583 2 337536232 371059060 2 389715331 682048619 2 988326494 993053331 2 159833625 861127609 2 652183344 821304427 2 679559260 807716233 2 380854425 911557959 2 292910660 384678167 2 11975...
output:
63840 27709 12128 7460 27166 87479 45358 2354 71710 58180 61925 22038 98516 27103 25655 23917 9032 23707 97809 48856 81786 93789 92794 65870 89314 29123 78781 97935 36327 85724 35504 63473 88570 73969 71070 84190 79100 74410 97193 7957 4807 10391 42637 32110 14394 47633 25182 23251 24025 58962 95259...
result:
ok correct!
Test #44:
score: 0
Accepted
time: 193ms
memory: 242848kb
input:
100000 2 485070748 880630415 2 149909829 181582017 2 518889351 802876478 2 629244207 950379261 2 334862810 720985874 2 926637129 977914386 2 18740461 57165062 2 536638895 620961118 2 340803355 728643217 2 305158581 748948117 2 814938104 903197336 2 580779830 683888210 2 553576170 584700111 2 2906157...
output:
63859 36380 45723 97789 42641 25388 92560 39504 78849 95834 83135 89667 19945 66603 8031 99834 9325 50431 11301 96338 91471 93721 2972 43288 66517 99484 47325 38180 38672 75662 88858 65684 55174 62674 6923 87714 13790 44989 49104 79485 29783 34119 43182 19349 24260 15495 55600 36332 2270 63304 15017...
result:
ok correct!
Test #45:
score: 0
Accepted
time: 753ms
memory: 235048kb
input:
50000 4 45 60 36 68 2 18 29 3 78 27 73 2 17 37 5 39 49 45 68 74 3 45 88 36 5 77 70 38 28 1 4 71 0 40 18 6 91 49 27 7 38 31 3 73 45 47 3 8 21 65 1 98 6 42 70 9 41 62 0 5 42 79 39 37 31 3 74 100 17 3 95 31 87 5 51 48 32 72 69 2 92 87 1 72 5 98 33 13 28 18 3 98 42 33 5 93 85 100 5 69 3 94 6 88 4 87 81 ...
output:
49998 47772 27909 36525 49478 12339 22119 32546 5982 44275 33970 33275 6868 10825 15801 40809 1337 16796 25932 2521 41651 30043 21308 30841 35547 219 22737 34783 29890 24890 11717 10579 4005 34999 20933 23917 35030 21041 27954 27727 38266 7075 27396 44091 20715 16381 6921 24140 21751 36320 7528 3352...
result:
ok correct!
Test #46:
score: 0
Accepted
time: 411ms
memory: 240636kb
input:
50000 4 207 607 880 135 3 484 438 759 4 192 317 598 811 3 912 107 838 5 245 981 121 849 634 7 920 599 638 85 830 673 162 1 465 4 597 436 704 81 5 634 900 844 898 527 4 899 920 435 234 2 523 581 3 6 126 182 7 904 163 90 973 794 369 390 3 207 868 74 7 884 259 79 169 559 547 49 2 427 435 2 313 812 4 68...
output:
49934 38695 17704 29962 18651 20412 46899 4904 43131 38824 14152 17495 21401 20972 4626 48074 31829 33318 5310 43034 3364 25615 7990 46281 29390 47918 31667 12105 47476 14763 43438 15285 9294 37415 22559 42932 2395 36139 11049 41139 25696 25187 38541 44174 20452 15490 19828 36772 38424 7060 28416 46...
result:
ok correct!
Test #47:
score: 0
Accepted
time: 273ms
memory: 239792kb
input:
50000 3 1113 774 1032 3 1637 849 1523 2 1291 1960 5 737 376 438 1907 844 2 1657 1636 5 1252 1128 336 174 417 3 438 1645 364 5 1541 1594 821 1060 439 3 878 1043 1632 7 1506 1023 1734 1918 904 340 1213 2 1769 1778 5 1053 463 381 1348 395 3 323 1324 382 3 177 664 201 1 285 2 17 1159 3 1398 5 1465 4 834...
output:
49807 27918 13379 8838 13210 22772 9061 10040 32890 47233 40288 789 44400 4167 16070 31384 12922 12180 15494 5126 49832 10438 34678 19277 18227 2368 40591 38823 40511 18121 25632 22694 36807 13523 17134 23075 13200 5429 33740 11615 967 28642 847 31914 41036 7159 33954 11586 9472 15360 34274 991 2869...
result:
ok correct!
Test #48:
score: 0
Accepted
time: 221ms
memory: 240468kb
input:
50000 6 1932 2335 319 1627 1276 903 1 1074 4 3418 1963 2015 1396 3 423 2262 439 4 3261 1799 1742 854 4 2511 561 2598 1938 1 1609 4 2106 1519 3801 699 4 3822 2210 1792 2063 6 159 2986 2128 1072 3137 2632 4 1520 3179 2927 2523 6 549 1587 1568 3324 2096 1463 2 2671 1427 5 387 3441 1333 1212 2766 4 779 ...
output:
49508 29368 13939 7809 4622 5132 6499 34314 18185 48417 44737 44417 46948 16809 46472 28312 17396 17444 6540 39843 38311 7483 37295 11531 36069 34611 40111 10712 11620 4885 37899 37544 16327 41570 42240 18425 47001 1386 5260 36521 34119 48199 15312 704 24240 16485 43975 37910 21027 24809 14415 10158...
result:
ok correct!
Test #49:
score: 0
Accepted
time: 187ms
memory: 238728kb
input:
50000 3 2180 4273 1595 1 2283 6 4115 4886 4931 5988 298 3993 6 2726 75 1258 5026 109 3702 5 4249 355 4095 4737 1812 7 5354 1250 1052 1931 4396 418 2218 3 791 1744 3896 3 1067 520 5278 2 1206 5518 6 4755 4598 3417 4111 4792 3796 3 2658 4809 27 5 1258 1959 2520 2410 1625 4 2772 3311 1798 111 5 2752 11...
output:
49185 40982 29361 28791 44993 8002 8898 24803 26817 9230 48774 10583 34295 17127 23324 36117 1325 31871 36904 13172 13728 41193 39210 34090 26501 2992 6729 8925 29879 3841 22109 25582 42937 35365 21298 4275 27510 49662 48389 22953 15633 4339 17561 13362 26078 27041 3726 4073 23581 27450 19100 40701 ...
result:
ok correct!
Test #50:
score: 0
Accepted
time: 168ms
memory: 240148kb
input:
50000 3 4868 1966 2385 4 2121 6317 2935 2319 3 5761 3025 6058 6 5262 7486 7357 6772 6784 1105 2 965 1435 4 2526 2549 1034 1014 4 7770 4679 1031 1226 6 976 7443 5675 3183 3319 1526 5 4613 5237 1010 7973 2692 1 3384 3 2999 406 1835 6 7582 3141 3671 1740 3375 5057 4 3165 2014 5380 4642 6 1824 174 6914 ...
output:
48824 10068 13594 14733 39791 45118 39611 49349 3500 10087 21585 16847 26382 28347 19667 26450 13366 7513 21482 49590 12945 2089 41732 31950 29825 9546 33330 33555 12496 10267 48969 14719 32798 26591 15232 28508 6284 39240 3237 11981 36858 32973 23060 4636 34701 44345 39519 34137 8847 9506 43605 205...
result:
ok correct!
Test #51:
score: 0
Accepted
time: 165ms
memory: 238932kb
input:
50000 4 7593 1614 9605 3123 3 3673 2818 30 2 3293 200 3 6148 3152 5348 6 1284 5233 1818 447 473 8712 4 963 4638 4061 2896 4 3079 6749 1264 9590 1 6966 3 285 8991 6853 3 6009 4660 5257 4 1667 1080 2569 4683 6 8720 9357 1826 4842 6282 1412 3 8047 3801 6251 4 892 7729 691 1327 7 9382 3872 5153 6802 236...
output:
48495 46921 4477 3023 42547 4379 40071 42258 9195 26175 24565 3853 10384 27056 9825 33180 28331 5334 5687 3645 7229 45137 32636 10115 30003 13581 6115 30710 44511 29243 25285 5190 39015 10414 19585 35971 19588 43476 19689 10990 2323 19698 45093 20850 49693 8064 1793 143 46655 49395 45555 19322 37936...
result:
ok correct!
Test #52:
score: 0
Accepted
time: 157ms
memory: 238204kb
input:
50000 5 9084 8425 11202 11358 7066 3 5889 618 3445 5 73 8742 13869 14172 9580 3 2723 10630 5226 2 12195 70 6 12891 7338 5390 12082 5651 12757 5 8214 13218 334 3783 10040 5 11050 3018 14446 1828 2438 4 4179 5438 69 4249 5 2570 141 4446 5177 5018 5 10577 1120 3074 8618 8751 4 1847 11695 10989 8132 3 1...
output:
47582 26700 5150 48387 14529 31553 13076 36170 49342 28120 20461 13387 31291 46106 31046 8216 43760 22972 39024 15797 32221 37032 17632 35685 32716 28267 17489 1321 4619 37491 9114 25937 9876 2388 34839 39196 16101 2073 28139 33937 31449 25481 31766 33561 37707 5142 45707 19510 30228 32568 41452 665...
result:
ok correct!
Test #53:
score: 0
Accepted
time: 148ms
memory: 239796kb
input:
50000 4 347 9390 17911 5940 8 2485 523 15473 602 15622 18596 15924 2713 3 3418 18845 5746 4 17377 16407 15812 16142 4 6843 7050 4642 12056 4 17662 6811 19686 17426 7 4423 2905 17326 6735 12999 17264 18134 4 6381 529 12432 5042 8 4812 8415 2342 436 2646 7294 7391 9015 3 16712 13743 9802 3 19946 19519...
output:
46601 40959 49096 15983 30427 7442 22550 16924 322 2164 13349 18221 36635 26475 37699 23376 2600 10669 39928 46928 4561 9345 19038 19350 11150 35656 37501 13692 13170 15295 11090 46820 44279 18488 2543 32005 44609 27915 17026 10837 44955 17996 30644 15670 35946 11966 22159 34346 23833 40036 22030 24...
result:
ok correct!
Test #54:
score: 0
Accepted
time: 149ms
memory: 238692kb
input:
50000 2 13646 8405 2 11353 10469 5 16080 22235 16681 23739 22080 2 12689 19542 4 10243 20288 22506 12090 3 12047 2856 456 2 17457 24668 6 5713 11086 22103 5218 19806 11314 4 11073 11885 13373 8871 5 4885 1937 16779 20998 23320 3 2832 9351 22420 4 9767 21633 22557 3387 4 6274 1841 2801 472 4 15542 11...
output:
45651 24512 45316 839 37659 40378 18956 39985 47740 4571 40008 1199 33392 15347 20617 10785 26295 38007 43216 17036 9430 49464 48957 22381 36021 36914 23484 16405 17391 23633 21758 7392 48871 30494 48905 9277 21427 45186 19525 22390 8277 14607 11993 26071 33021 14707 4547 18471 30432 31262 22396 208...
result:
ok correct!
Test #55:
score: 0
Accepted
time: 795ms
memory: 242476kb
input:
100000 2 95 57 2 94 7 2 81 18 2 29 24 1 15 2 11 1 2 0 59 3 82 83 88 2 24 40 2 90 23 1 8 2 36 57 3 88 7 18 1 64 2 68 28 2 57 13 1 88 1 82 2 71 87 2 99 6 1 15 4 54 45 83 71 3 98 89 100 2 65 93 1 72 3 16 99 45 5 65 36 8 95 68 1 96 1 19 2 25 95 2 12 8 2 5 0 1 70 2 25 94 2 20 85 2 87 4 3 66 21 79 2 65 54...
output:
99999 68002 74383 25418 14221 4968 25363 67887 31819 28700 79402 5035 85012 1506 91252 50237 84966 54210 91325 84904 97128 90844 97744 67293 53640 5191 85481 25551 1252 85476 74571 91341 5136 25488 74509 53806 40370 85346 97501 67617 96749 48122 68499 32723 73727 68544 60542 8697 1733 68581 8670 145...
result:
ok correct!
Test #56:
score: 0
Accepted
time: 593ms
memory: 241484kb
input:
100000 1 728 2 570 779 1 204 1 319 1 179 2 168 49 3 553 200 148 3 333 915 526 2 211 399 1 53 1 940 3 472 465 554 1 631 2 607 76 2 895 5 1 717 1 402 1 803 2 248 879 2 316 232 1 790 1 101 3 365 657 458 2 893 540 1 420 2 842 237 3 299 433 84 2 374 380 4 554 823 764 37 3 546 350 602 3 70 493 885 2 896 8...
output:
99977 67956 80933 84530 19697 38173 12211 7746 86568 57355 25330 71879 92246 43028 91078 94081 61588 12521 27520 23497 59808 639 90225 84573 25606 72611 83770 80601 87597 2858 98720 50242 69770 45369 83892 16119 11317 42934 75097 5321 86738 52868 74652 35706 73073 39751 34246 43094 96770 26565 32064...
result:
ok correct!
Test #57:
score: 0
Accepted
time: 410ms
memory: 242880kb
input:
100000 3 1673 1760 1959 3 1587 1262 1196 1 1692 2 685 333 1 1266 1 1726 1 150 2 562 455 2 1753 1222 3 94 1828 987 1 1581 1 1122 5 1172 1656 1619 1050 92 3 346 1421 1836 2 1726 315 3 174 1111 1716 2 460 1974 1 545 1 1772 3 397 1146 228 1 862 3 1658 1564 623 1 7 4 578 1344 190 1038 1 699 2 621 292 2 1...
output:
99920 501 3419 45853 26476 95971 93323 1624 61018 59061 30595 81796 39996 2276 68652 53283 82948 32924 3894 36970 66592 21024 72127 341 49793 64737 64452 98795 50194 48216 13085 56926 59338 45472 60388 79718 55334 8975 5495 80413 89114 99812 40478 74804 86377 66643 52708 48185 24898 3585 7779 84491 ...
result:
ok correct!
Test #58:
score: 0
Accepted
time: 374ms
memory: 243052kb
input:
100000 2 552 714 1 3933 4 432 2843 3596 2928 2 3538 1583 2 1030 3587 1 1403 2 485 3658 1 2496 3 1508 368 1426 2 629 704 1 892 2 3519 1658 3 1180 248 550 3 3367 1677 3703 2 3237 1548 4 678 283 3588 2431 1 3497 1 1423 3 1838 1657 935 4 1660 3924 431 1151 4 2507 1607 284 2371 1 2430 2 782 2666 1 3109 3...
output:
99719 62677 21213 57124 59561 95892 27072 61696 7444 32174 58195 56731 97930 77291 22457 41249 35824 87694 1701 13020 57054 40526 89565 71257 22903 40519 59381 4777 69246 65859 69536 8439 32720 51850 41070 81787 6915 87246 22950 82867 52936 85075 29449 77727 69586 94577 72906 28019 85354 59064 72514...
result:
ok correct!
Test #59:
score: 0
Accepted
time: 314ms
memory: 241660kb
input:
100000 1 2296 3 3934 3474 786 2 5866 5102 2 4440 1792 2 1259 869 2 3023 4842 2 3170 3000 2 413 2099 1 3773 1 4185 2 4726 5597 2 3898 5395 1 4124 1 1832 3 3915 501 4385 1 3790 1 2743 2 592 3352 1 744 1 5392 1 4274 1 4680 2 3719 2854 1 5368 1 4483 1 3742 1 3389 1 5183 1 3906 1 1687 1 2795 3 5557 5988 ...
output:
99411 96193 91741 49533 70454 57360 56124 99080 87159 33583 84046 73141 23834 97782 81344 14547 39566 80111 29789 77153 12473 87164 69331 37627 49510 82650 64719 93993 64935 3087 75224 77059 33312 33216 51599 15605 69292 18344 263 2126 72173 25677 71632 18170 10448 3684 90930 97572 23193 61461 98925...
result:
ok correct!
Test #60:
score: 0
Accepted
time: 253ms
memory: 241780kb
input:
100000 2 865 6108 1 293 3 4957 7211 1105 2 1737 4288 1 7618 5 3380 6343 4662 3171 900 1 3940 2 7205 2620 2 7834 300 1 5447 1 1760 2 2046 2779 2 4550 509 1 966 1 7574 2 1127 5323 2 3662 2363 1 6609 5 6609 6120 2847 678 2649 2 6709 943 2 5439 3024 2 5502 4555 1 4127 2 1482 1692 4 2284 6117 5244 652 1 ...
output:
99035 60418 63321 6629 48216 32889 52051 39547 84180 92688 32301 44271 92782 31043 1599 56320 57368 34234 75048 2385 50124 84297 53942 97906 73217 3217 39966 41978 84568 10598 48684 40436 26213 65628 11441 40226 15182 70660 77990 77119 41465 48228 19954 82193 50511 13856 72749 93848 71440 60573 5619...
result:
ok correct!
Test #61:
score: 0
Accepted
time: 270ms
memory: 241792kb
input:
100000 2 5762 6767 2 8537 2102 2 607 6367 3 7112 7745 6439 4 4620 3044 6364 1337 3 8350 5196 3138 3 6950 1884 9531 2 229 5292 2 1327 2119 1 7918 1 5152 3 72 3285 7124 3 9899 4001 7613 3 4298 1244 4791 1 7457 1 28 5 951 9662 4572 3502 9680 1 2138 2 5651 9154 1 9360 3 1813 6018 9794 3 4245 4824 5268 1...
output:
98540 3805 31491 6137 7149 71077 10622 31119 19120 26661 24690 77769 16128 73372 52660 80267 26588 69897 94745 56044 58913 13692 66883 16832 84521 59846 18219 69268 8474 57358 12515 46461 44181 37126 78282 82709 52704 33666 33836 3835 72927 9076 50244 51140 30441 66514 66526 10629 67122 36342 38756 ...
result:
ok correct!
Test #62:
score: 0
Accepted
time: 293ms
memory: 241956kb
input:
100000 1 11286 1 785 2 2239 7078 2 6616 8372 3 11324 13456 1784 1 7848 3 7628 474 3006 1 13935 3 12019 9631 4317 3 7682 4312 6157 2 11651 529 1 9630 1 13221 2 13870 5539 4 2192 164 14807 4346 5 9155 7210 13841 13429 13449 2 5021 4936 1 8822 2 12434 7739 2 5123 8562 3 1017 13118 9476 2 8039 4817 2 89...
output:
97114 2290 47318 84725 54277 58233 83897 63524 57556 25891 18849 11921 31661 10154 7214 41305 24213 87806 23475 85453 52696 5573 59393 86484 53957 36160 97738 97453 51919 97119 13382 9204 60840 69958 63397 83681 12362 82541 92556 79078 40490 84479 98755 57440 8393 65863 89390 89145 4403 64736 50 833...
result:
ok correct!
Test #63:
score: 0
Accepted
time: 228ms
memory: 241656kb
input:
100000 1 3339 2 12542 1582 3 11876 1621 19577 3 3136 13480 6209 1 3391 1 15068 1 4363 1 16390 1 2717 2 11036 9644 2 19887 18032 1 17014 4 17213 9715 12377 19774 2 9019 3019 1 11718 3 19104 11059 18186 1 10481 2 13743 5146 4 17640 10057 19995 1096 1 749 3 5711 14461 10198 3 5238 12665 17485 1 4715 2 ...
output:
95363 63091 50483 29578 92771 38555 83689 22807 84362 50276 19004 38911 8287 11569 75566 42189 76659 75350 93561 85894 16455 20033 34403 32423 78469 46210 70177 64351 37242 16666 40372 18926 4946 75064 89995 17769 68006 94839 7072 41753 7325 89952 10648 60791 24015 46328 41803 93954 15028 42474 7618...
result:
ok correct!
Test #64:
score: 0
Accepted
time: 249ms
memory: 243668kb
input:
100000 1 22372 2 807 5345 1 1726 1 18351 1 18404 2 18059 21614 4 15502 10174 20082 19736 3 12777 11132 23474 3 21325 14585 6839 5 11249 2371 14077 1481 8214 2 10996 4408 2 12787 13372 2 11639 10240 2 19955 13988 2 18061 7646 2 18513 947 2 3721 5607 1 957 1 2616 1 23054 2 24206 247 2 10037 24755 2 30...
output:
93514 85057 54497 23860 5753 42788 53295 76241 100 14866 67730 54845 40646 35594 8447 33859 6279 12240 73438 21023 24734 66963 80450 42976 82423 5521 10709 26609 35474 54305 88953 6782 45363 29695 50077 18693 77522 75873 41617 97572 46690 61782 28272 6790 13929 14550 55706 69323 77578 25850 86028 72...
result:
ok correct!
Test #65:
score: 0
Accepted
time: 80ms
memory: 231352kb
input:
2 199999 999936325 999932716 999907239 999936208 999842617 999852700 999975976 999934549 999950109 999989471 999836186 999912739 999898154 999941223 999804199 999930540 999981113 999969089 999802349 999906832 999873865 999939686 999927906 999921840 999878431 999866873 999935847 999964030 999950381 9...
output:
1 1 2
result:
ok correct!
Extra Test:
score: -3
Extra Test Failed : Time Limit Exceeded on 4
input:
20000 11 616074294 616688586 617543956 617804057 616760371 617032967 615806357 615831200 615673205 616467136 616604322 16 354544692 355221295 356256699 354712646 356303283 356124582 356079479 355539739 354375681 356232106 355579703 355195290 354556796 355032840 354752514 356006391 13 246406187 50522...