QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#109604#1359. Setting MapslefyWA 4ms5748kbC++142.2kb2023-05-29 21:09:142023-05-29 21:09:16

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-29 21:09:16]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:5748kb
  • [2023-05-29 21:09:14]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long 
using namespace std;
const ll inf=1e18;
int n,m,K,S,E,c[210];
struct node{
    int to,nxt;
    ll val;
}e[2000010];
int head[2100],cnt=1;
void Add(int u,int v,ll val){
    e[++cnt]={v,head[u],val};
    head[u]=cnt;
}
void add(int u,int v,ll val){
    Add(u,v,val),Add(v,u,0);
}
int get(int i,int j,int k){
    return (i-1)*K*2+(j-1)*2+k+1;
}
int d[2100],s,t;
int bfs(){
    d[s]=1;
    for(int i=1;i<=t;i++)d[i]=0;
    queue<int>q;q.push(s);
    while(!q.empty()){
        int x=q.front();
        q.pop();
        for(int i=head[x];i;i=e[i].nxt){
            int v=e[i].to;
            if(!d[v]&&e[i].val){
                d[v]=d[x]+1;
                if(v==t)return 1;
                q.push(v);
            }
        }
    }
    return 0;
}
ll dinic(int x,ll flow){
    if(x==t)return flow;
    ll r=flow,k;
    for(int i=head[x];i;i=e[i].nxt){
        int v=e[i].to;
        if(!e[i].val||d[v]!=d[x]+1)continue;
        k=dinic(v,min(e[i].val,r));
        if(!k)d[v]=0;
        e[i].val-=k;e[i^1].val+=k;
        r-=k;
        if(!r)return flow;
    }
    return flow-r;
}
int main(){
    scanf("%d%d%d%d%d",&n,&m,&K,&S,&E);
    for(int i=1;i<=n;i++)scanf("%d",&c[i]);
    for(int i=1;i<=n;i++){
        for(int j=1;j<=K;j++){
            if(j!=K)add(get(i,j,0),get(i,j+1,1),inf),add(get(i,j,0),get(i,j+1,0),inf),add(get(i,j,1),get(i,j+1,1),inf);
            add(get(i,j,0),get(i,j,1),c[i]);
        }
    }
    t=get(n,K,1)+1;
    add(s,get(S,1,0),inf);
    add(get(E,K,1),t,inf);
    for(int i=1;i<=m;i++){
        int x,y;scanf("%d%d",&x,&y);
        for(int j=1;j<=K;j++){
            add(get(x,j,1),get(y,j,0),inf);
            add(get(y,j,1),get(x,j,0),inf);
        }
    }
    ll ans=0;
    while(bfs())ans+=dinic(s,inf);
    if(ans>=inf)printf("-1");
    else{
        vector<int>a;
        for(int i=1;i<=n;i++){
            for(int j=1;j<=K;j++){
                if(d[get(i,j,0)]&&!d[get(i,j,1)]){
                    a.push_back(i);break;
                }
            }
        }
        printf("%d\n",(int)a.size());
        for(int x:a)printf("%d ",x);
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 3ms
memory: 3588kb

input:

3 2 5
1 3
1 60 35
1 2
2 3

output:

-1

result:

ok answer = IMPOSSIBLE

Test #2:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

7 11 1
1 7
100 5 7 16 11 12 100
1 2
1 3
1 4
1 5
2 3
2 6
3 6
4 3
4 7
5 7
6 7

output:

4
2 3 4 5 

result:

ok answer = 39

Test #3:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

11 17 2
1 11
1000 10 10 10 10 10 10 10 10 10 1000
1 2
1 3
1 4
1 5
1 6
2 7
3 7
4 7
5 8
6 8
7 8
7 9
7 10
8 9
8 11
9 11
10 11

output:

6
5 6 7 8 9 10 

result:

ok answer = 60

Test #4:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

2 2 2
2 1
100 200
1 2
2 1

output:

2
1 2 

result:

ok answer = 300

Test #5:

score: 0
Accepted
time: 2ms
memory: 3604kb

input:

5 5 5
1 5
1 1 1 1 1
1 2
2 3
3 4
4 5
1 5

output:

-1

result:

ok answer = IMPOSSIBLE

Test #6:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

100 120 5
1 5
5367720 2854323 1799056 9744604 3215334 7580413 6269402 3208439 8812449 3297484 2047196 4044341 7514502 2928715 9335004 3935096 6660663 3356480 4801491 5786147 895995 6710240 222342 4469390 1543213 6678041 8838445 6741919 8138951 5273670 8983795 5131484 4245746 7460466 8357966 8464419 ...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #7:

score: 0
Accepted
time: 2ms
memory: 3588kb

input:

2 1 5
1 2
10 10
1 2

output:

-1

result:

ok answer = IMPOSSIBLE

Test #8:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

154 304 2
67 7
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

2
7 67 

result:

ok answer = 20000000

Test #9:

score: 0
Accepted
time: 2ms
memory: 3672kb

input:

75 146 1
15 2
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000000...

output:

1
15 

result:

ok answer = 10000000

Test #10:

score: 0
Accepted
time: 2ms
memory: 3828kb

input:

182 360 4
97 110
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #11:

score: 0
Accepted
time: 2ms
memory: 3764kb

input:

136 268 5
132 5
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #12:

score: 0
Accepted
time: 2ms
memory: 3744kb

input:

200 396 3
174 124
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

200
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok answer = 2000000000

Test #13:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

200 396 3
42 18
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

200
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok answer = 2000000000

Test #14:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

37 399 5
5 35
891013 857886 463822 491619 5700997 373660 280470 331195 292218 4060 330862 140381 522628 931507 600262 414267 639018 496399 286724 783899 792123 775919 981183 469461 229242 320358 970309 811929 818205 630620 209749 899622 339790 483597 7328305 375252 241902
37 32
26 25
31 37
11 25
35 ...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #15:

score: 0
Accepted
time: 2ms
memory: 3680kb

input:

43 447 4
23 5
410445 107466 417812 818439 7500390 767395 955105 835303 417635 40481 687217 129693 686787 546514 598770 645791 239755 22583 513445 243544 454644 619458 8758220 584039 864849 479006 85516 734429 997123 561319 900136 750915 22210 812718 315780 263441 639259 543094 40967 109688 857581 71...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #16:

score: 0
Accepted
time: 2ms
memory: 3736kb

input:

94 454 4
10 37
686254 113102 198921 108527 245692 298529 730688 309868 250532 7757813 223044 866362 685371 924303 328789 529482 811273 239786 73318 495070 857739 562195 586139 625871 776305 557501 798290 742600 350241 584299 26519 305673 678898 992953 656558 268773 9023461 10388 431117 542020 928225...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #17:

score: 0
Accepted
time: 2ms
memory: 3760kb

input:

69 415 5
34 13
187979 21011 558124 591620 617581 886091 755733 454183 48557 77690 663115 689272 6523235 47643 93831 636058 841310 272665 181270 75938 161738 713173 360987 182941 884235 664804 382347 462472 55249 646350 558127 66134 823777 5017391 738022 598894 643281 584923 5728 719403 528781 287123...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #18:

score: 0
Accepted
time: 1ms
memory: 3752kb

input:

74 410 5
56 20
488488 698144 373082 803224 42941 35786 251834 295325 310693 453121 656518 876704 468532 536212 395433 621720 64467 814721 93928 8845346 519676 871614 340758 843970 729408 449075 751325 413222 556993 705853 943484 700768 640760 765293 197380 348204 584112 9735 76698 324024 536009 3061...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #19:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

112 475 5
77 14
458807 862988 747050 549161 272433 613321 283502 255018 225146 161415 101246 246922 750336 5181286 66176 340232 996869 865175 206322 151130 137565 684082 341281 334633 841523 356897 991731 533584 380228 849451 189214 56801 683298 25418 383598 768288 551730 556269 737795 271814 323695...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #20:

score: 0
Accepted
time: 2ms
memory: 3856kb

input:

119 484 5
11 32
165598 630106 823509 869781 685441 742597 915091 659432 634290 175760 5311972 639237 255082 203370 950415 872349 181092 451235 734695 622085 432676 505268 968125 789747 136429 166389 9290 176005 262474 551589 350471 7478302 783302 603239 559669 687158 26612 369279 547990 78403 15335 ...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #21:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

142 375 5
116 104
63599 894199 604295 332052 288396 916080 30248 354232 445633 440305 374406 981920 863467 569323 441073 586879 682410 493748 530620 375855 906213 44552 558142 127276 896643 254275 258514 292884 633970 418024 477079 849005 885347 922653 969968 752223 964300 152813 696644 61238 79525 ...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #22:

score: 0
Accepted
time: 2ms
memory: 3764kb

input:

183 487 4
160 104
861248 114428 458126 590856 434607 175599 497335 415522 5210 543525 358378 651065 795806 77245 262676 791440 800664 515963 187174 791630 577197 405448 310869 790587 273155 998576 784475 349319 645638 980898 825396 921220 776036 809716 680739 298663 103377 526237 912938 251723 15232...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #23:

score: 0
Accepted
time: 2ms
memory: 3784kb

input:

200 499 4
63 61
840236 200242 748905 993501 756897 832236 310561 724047 795114 972430 614472 303292 528099 983661 904724 998052 831483 874832 545487 687161 79029 583414 108438 145634 201003 296143 58522 233209 757702 862078 269858 501581 318663 387614 269896 806625 523906 987641 765239 153963 228254...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #24:

score: 0
Accepted
time: 1ms
memory: 5740kb

input:

150 374 5
113 129
963484 390638 959395 95619 548927 978322 307668 617709 949256 5435 502970 513103 636082 90166 226330 173776 162221 287649 574318 187625 429914 750641 787872 511271 627856 681261 633555 517549 938395 275120 558362 43248 239223 370347 191039 614969 1817 207776 297662 526119 337127 49...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #25:

score: 0
Accepted
time: 3ms
memory: 3748kb

input:

176 131 5
47 118
431659 989353 962218 363659 988302 933830 26769 460320 590689 887733 328107 362131 831900 629028 261988 606418 812284 689190 910954 311346 746819 919793 175473 488620 7030 857310 989872 927131 736414 500269 390114 828223 893320 431934 572166 687804 590341 326808 138848 364508 215467...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #26:

score: 0
Accepted
time: 1ms
memory: 3884kb

input:

200 494 5
28 5
143725 965366 545804 656307 8059164 74371 472455 439180 179926 743420 742454 930313 936719 83635 150734 836620 254600 252025 157157 565370 992891 832679 358393 958331 70918 561942 287145 5395471 721066 414374 557625 207539 738895 924411 530195 153167 818558 426299 654081 667595 719269...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #27:

score: 0
Accepted
time: 2ms
memory: 3872kb

input:

198 392 5
31 30
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #28:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

196 388 5
50 11
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #29:

score: 0
Accepted
time: 1ms
memory: 3904kb

input:

198 392 5
89 127
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

82
1 2 8 12 15 16 19 22 26 30 35 38 39 40 42 43 46 47 48 52 53 54 55 57 58 59 67 70 73 76 77 79 82 86 87 88 89 92 93 97 98 101 102 105 106 111 112 113 115 117 119 122 126 127 132 137 138 139 144 147 148 150 151 152 154 155 158 161 163 165 170 172 173 177 178 180 183 184 189 190 192 195 

result:

ok answer = 819999994

Test #30:

score: 0
Accepted
time: 3ms
memory: 3832kb

input:

195 386 5
143 177
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

72
2 3 8 12 13 14 15 17 18 23 25 28 30 32 33 37 38 39 44 56 57 59 62 65 68 73 74 77 79 80 83 85 89 93 95 98 101 105 112 114 115 119 121 122 123 124 125 127 129 131 135 141 142 143 145 146 151 158 160 163 165 167 170 171 172 174 175 177 178 183 186 194 

result:

ok answer = 719999993

Test #31:

score: 0
Accepted
time: 0ms
memory: 3908kb

input:

198 392 5
52 51
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

77
1 4 6 8 14 16 19 22 27 31 36 37 38 41 49 51 52 56 58 60 62 67 70 73 74 77 78 79 81 82 83 85 86 91 103 105 106 107 110 111 112 113 118 127 130 131 132 133 135 136 137 138 143 145 146 147 149 153 154 155 156 160 169 173 176 180 182 183 184 186 189 190 192 194 196 197 198 

result:

ok answer = 769999995

Test #32:

score: 0
Accepted
time: 1ms
memory: 3916kb

input:

200 396 5
164 66
10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

82
2 3 4 5 8 9 10 15 18 21 22 23 25 27 30 33 34 38 40 42 43 45 48 50 55 59 60 63 64 66 67 68 70 72 73 77 78 81 84 89 90 91 93 95 97 99 101 104 106 107 109 110 111 113 114 115 129 130 131 135 136 137 141 142 148 149 152 153 156 161 164 167 169 174 175 183 187 189 192 196 199 200 

result:

ok answer = 819999987

Test #33:

score: 0
Accepted
time: 1ms
memory: 3848kb

input:

195 386 5
48 49
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

82
1 3 4 7 15 22 24 28 30 32 33 35 36 37 38 40 43 47 48 49 53 54 56 57 60 61 62 65 66 69 71 72 73 76 80 85 86 90 91 93 94 97 99 103 106 110 111 112 114 120 123 124 127 128 130 133 134 137 139 141 145 146 150 151 152 153 155 156 157 158 160 161 162 165 167 175 181 182 185 190 191 195 

result:

ok answer = 819999998

Test #34:

score: 0
Accepted
time: 3ms
memory: 3896kb

input:

196 388 5
57 124
10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

72
1 2 12 14 15 17 26 27 34 37 39 40 41 42 45 46 53 57 63 64 68 70 71 72 73 74 75 77 78 79 80 96 104 105 106 114 115 117 118 120 122 124 125 127 130 132 133 136 137 139 140 143 149 150 151 154 157 158 164 165 166 168 172 174 177 181 185 188 191 192 195 196 

result:

ok answer = 719999996

Test #35:

score: 0
Accepted
time: 3ms
memory: 3844kb

input:

197 390 5
135 152
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

87
1 8 11 13 14 16 17 18 19 20 21 27 33 36 42 44 46 49 50 52 54 55 58 60 62 66 67 68 70 71 74 85 86 87 89 90 91 95 99 100 102 105 107 110 111 112 113 114 115 118 122 123 124 127 130 131 134 135 136 138 142 143 145 151 152 154 156 161 163 166 168 170 173 174 178 179 180 182 183 184 188 190 191 193 19...

result:

ok answer = 869999995

Test #36:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

195 386 5
112 82
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #37:

score: 0
Accepted
time: 0ms
memory: 3908kb

input:

195 386 5
155 102
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

72
1 3 4 6 7 8 9 12 14 16 18 19 24 29 39 46 54 56 60 62 63 64 65 69 70 72 73 79 88 90 91 92 94 97 99 100 101 102 103 105 106 107 109 110 111 115 117 125 126 127 133 136 143 144 145 147 150 152 153 154 155 159 160 166 168 169 172 174 175 177 193 194 

result:

ok answer = 719999992

Test #38:

score: 0
Accepted
time: 2ms
memory: 3896kb

input:

198 392 5
51 183
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #39:

score: 0
Accepted
time: 3ms
memory: 3908kb

input:

199 394 5
156 1
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

77
1 4 8 10 15 16 18 21 23 24 27 35 44 49 51 53 55 58 59 61 62 63 64 67 68 69 71 72 73 80 81 84 85 86 89 90 92 96 99 103 105 107 110 112 114 116 117 119 127 128 131 141 150 151 156 158 160 162 163 165 166 168 171 176 177 179 180 181 184 185 189 191 193 194 195 196 199 

result:

ok answer = 769999997

Test #40:

score: 0
Accepted
time: 3ms
memory: 3852kb

input:

200 396 5
168 30
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

82
1 5 6 7 9 10 12 14 16 19 20 21 23 24 30 34 36 37 39 40 42 44 47 50 51 56 57 59 60 62 63 66 69 70 72 74 81 82 84 85 93 95 96 98 102 104 106 109 113 114 115 116 117 119 120 121 126 127 128 132 138 140 141 150 151 155 158 162 168 169 170 171 173 180 183 185 186 189 190 192 195 197 

result:

ok answer = 819999997

Test #41:

score: 0
Accepted
time: 3ms
memory: 3876kb

input:

199 394 5
151 18
10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 100000...

output:

72
4 8 16 18 25 28 29 33 36 38 40 41 43 47 48 49 50 51 54 55 58 61 62 65 68 74 75 76 77 79 86 89 90 95 96 101 106 109 111 115 120 121 122 127 128 132 134 141 148 151 152 154 155 156 158 159 160 161 163 166 167 173 174 175 179 184 187 190 191 193 194 199 

result:

ok answer = 719999997

Test #42:

score: 0
Accepted
time: 3ms
memory: 3952kb

input:

199 394 5
104 2
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

82
1 2 6 14 15 16 18 20 23 24 26 27 29 31 37 39 40 47 49 50 51 52 54 55 61 64 66 68 72 75 78 80 81 82 87 88 89 90 91 94 95 100 101 104 106 107 109 113 114 121 124 130 131 135 137 139 141 144 147 149 150 153 155 157 161 162 166 169 170 171 173 174 175 176 177 182 186 187 188 189 191 198 

result:

ok answer = 819999992

Test #43:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

199 394 5
168 188
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

77
3 5 8 9 12 13 16 17 20 28 31 32 35 42 44 46 48 50 56 58 60 61 63 64 66 68 71 74 75 78 82 83 90 91 96 105 106 109 110 112 115 116 123 124 125 129 133 134 138 141 142 143 145 146 149 151 153 157 158 161 162 166 167 168 171 172 174 177 179 182 186 188 193 194 195 196 198 

result:

ok answer = 769999994

Test #44:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

196 388 5
119 6
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #45:

score: 0
Accepted
time: 3ms
memory: 3952kb

input:

199 394 5
137 142
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

72
5 6 8 9 12 13 14 15 17 19 22 23 24 26 27 28 31 32 33 35 37 38 46 47 52 55 56 58 60 62 66 68 69 71 77 79 82 83 88 91 98 100 101 103 104 107 111 117 121 128 129 130 133 137 138 139 142 144 149 155 156 158 161 164 166 167 168 170 174 188 190 192 

result:

ok answer = 719999997

Test #46:

score: 0
Accepted
time: 3ms
memory: 3948kb

input:

199 394 5
51 147
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 100000...

output:

82
1 2 4 11 16 22 24 27 29 31 33 34 35 37 39 40 41 43 45 46 49 51 52 55 56 57 58 60 65 66 69 70 75 77 79 82 83 85 89 90 91 94 96 98 99 104 105 110 111 112 113 115 117 121 122 126 127 130 134 135 137 147 149 153 155 156 160 161 173 174 176 178 180 181 184 185 186 187 189 190 196 198 

result:

ok answer = 819999995

Test #47:

score: 0
Accepted
time: 3ms
memory: 3904kb

input:

198 392 5
136 108
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

72
1 6 7 11 15 16 17 20 21 23 26 27 29 30 32 41 48 49 54 58 59 60 64 65 66 67 68 69 70 76 77 78 81 82 84 85 91 92 93 94 103 105 108 111 112 113 116 125 126 127 131 136 137 140 142 160 168 169 172 173 175 179 183 184 185 190 191 192 193 195 196 198 

result:

ok answer = 719999994

Test #48:

score: 0
Accepted
time: 3ms
memory: 3896kb

input:

196 388 5
113 44
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

72
5 6 10 12 13 16 17 22 30 32 35 38 39 40 44 46 52 59 62 64 65 68 69 71 75 78 79 81 83 86 89 90 91 98 100 102 108 110 111 112 113 115 122 126 130 134 136 138 139 143 145 149 150 153 154 158 160 161 170 177 178 181 182 184 185 188 189 190 191 192 194 196 

result:

ok answer = 719999994

Test #49:

score: 0
Accepted
time: 3ms
memory: 3896kb

input:

198 392 5
153 58
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

82
1 2 4 5 9 10 11 13 18 19 22 28 29 30 37 44 45 47 49 50 52 54 55 58 59 60 62 68 74 80 82 85 87 89 92 94 97 99 102 105 109 110 113 114 116 117 118 119 126 130 131 135 136 140 141 151 153 155 156 157 158 160 161 162 163 164 165 169 172 177 178 179 180 181 184 185 186 187 190 192 193 197 

result:

ok answer = 819999994

Test #50:

score: 0
Accepted
time: 1ms
memory: 3848kb

input:

196 388 5
33 11
10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 1000000...

output:

72
7 8 9 10 11 13 14 15 16 19 23 24 26 28 29 33 35 37 42 49 52 53 54 56 57 59 63 65 71 73 74 76 81 83 86 92 93 94 99 101 104 106 107 110 111 112 113 117 119 122 124 126 127 131 133 135 142 144 150 152 157 159 160 163 166 167 169 170 180 182 194 195 

result:

ok answer = 719999991

Test #51:

score: 0
Accepted
time: 4ms
memory: 3860kb

input:

200 396 5
20 162
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

77
4 6 12 13 14 16 18 20 21 22 30 33 35 37 40 41 43 44 46 48 51 52 54 55 59 63 65 66 67 68 69 71 75 79 83 88 91 92 95 97 98 100 101 105 107 116 118 122 123 124 125 127 128 133 137 139 141 142 148 153 154 157 158 159 160 162 164 167 168 169 173 187 189 194 195 197 199 

result:

ok answer = 769999997

Test #52:

score: 0
Accepted
time: 3ms
memory: 3872kb

input:

197 390 5
41 142
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

77
1 4 5 6 8 9 11 12 13 14 15 17 18 20 22 23 26 29 34 35 39 40 41 42 43 46 50 51 54 59 64 65 67 70 81 84 92 93 98 99 100 107 109 114 115 116 118 121 124 128 129 133 134 138 139 141 142 147 148 149 150 152 155 158 160 162 163 170 172 173 174 177 179 185 186 194 196 

result:

ok answer = 769999995

Test #53:

score: 0
Accepted
time: 3ms
memory: 3912kb

input:

199 394 5
21 130
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

77
9 15 16 21 22 23 24 25 26 27 28 30 33 34 35 37 43 45 48 50 52 54 56 59 60 61 62 64 69 75 79 82 87 89 94 95 98 102 104 106 108 109 111 113 114 116 120 126 128 129 130 131 132 136 141 143 148 151 155 160 168 169 170 171 174 175 176 177 181 182 183 185 189 191 193 196 198 

result:

ok answer = 769999994

Test #54:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

195 386 5
26 66
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 100000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #55:

score: 0
Accepted
time: 3ms
memory: 3908kb

input:

195 386 5
57 108
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

87
1 3 4 5 6 7 10 12 13 14 15 16 18 24 26 34 37 41 42 47 48 51 53 54 55 56 57 58 59 60 63 64 66 69 70 72 76 84 85 88 90 92 93 96 97 98 99 100 103 104 105 106 107 108 111 116 117 118 119 120 126 127 129 131 135 138 143 146 150 151 154 155 156 158 161 162 163 164 168 169 170 174 177 178 185 188 189 

result:

ok answer = 869999994

Test #56:

score: 0
Accepted
time: 3ms
memory: 3884kb

input:

200 396 5
183 125
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

77
2 4 8 11 14 16 19 21 22 24 25 26 29 33 37 38 40 42 48 51 55 58 59 61 63 65 68 69 73 75 79 80 81 83 86 89 92 93 98 103 107 111 115 116 118 119 124 125 126 128 129 130 131 133 134 135 143 153 154 155 157 160 161 164 166 169 170 173 178 179 181 183 184 186 188 198 199 

result:

ok answer = 769999987

Test #57:

score: 0
Accepted
time: 3ms
memory: 3828kb

input:

195 386 5
103 126
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

77
3 5 7 9 13 16 19 25 26 27 28 32 34 36 37 38 39 42 47 49 50 52 53 56 59 62 64 66 71 76 77 78 79 82 83 84 88 90 93 95 97 103 107 114 116 118 119 120 121 122 125 126 129 131 133 141 146 149 150 152 153 160 164 168 170 172 174 178 180 181 184 185 186 187 188 190 195 

result:

ok answer = 769999997

Test #58:

score: 0
Accepted
time: 3ms
memory: 3896kb

input:

195 386 5
125 41
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

87
1 2 3 4 8 16 20 23 27 29 31 39 41 44 45 46 51 52 55 56 57 58 60 63 67 68 72 73 74 75 76 77 82 84 85 86 91 92 93 98 99 104 106 110 111 112 114 115 116 118 121 123 125 127 129 130 131 133 135 137 138 140 141 144 145 147 148 149 150 151 155 156 158 163 165 168 170 172 175 177 178 183 188 191 192 193...

result:

ok answer = 869999994

Test #59:

score: 0
Accepted
time: 3ms
memory: 3888kb

input:

197 390 5
86 43
10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

87
3 10 12 14 15 18 20 22 23 24 30 31 38 40 41 43 44 46 47 50 53 54 62 63 71 73 74 76 78 79 80 81 83 85 86 87 88 89 91 93 94 98 101 103 104 108 110 111 112 113 116 117 120 121 127 130 131 132 134 139 140 141 147 148 150 158 159 161 162 165 166 168 170 171 173 174 175 179 180 183 186 187 191 192 193 ...

result:

ok answer = 869999996

Test #60:

score: 0
Accepted
time: 2ms
memory: 5664kb

input:

197 390 5
84 59
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 100000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #61:

score: 0
Accepted
time: 2ms
memory: 3876kb

input:

197 390 5
158 175
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

92
2 3 5 6 9 10 11 12 13 14 15 16 17 19 20 26 28 31 33 35 36 39 41 43 45 46 50 52 55 56 57 59 65 66 70 71 72 74 76 77 78 79 80 81 82 85 86 88 89 91 92 94 96 100 101 105 106 111 114 118 122 123 124 125 130 136 141 149 150 151 154 157 158 159 164 166 169 171 173 174 175 176 177 179 182 183 185 189 190...

result:

ok answer = 919999997

Test #62:

score: 0
Accepted
time: 1ms
memory: 3896kb

input:

200 396 5
77 26
10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000000...

output:

92
2 6 8 9 12 13 16 19 20 21 22 23 26 28 33 38 39 44 45 46 47 49 50 52 55 56 57 58 59 61 62 64 72 74 75 77 78 79 80 83 84 88 91 92 93 96 99 100 101 103 106 107 108 110 111 112 116 117 119 122 124 126 127 129 131 132 136 139 140 143 144 145 148 149 151 155 158 164 166 168 174 177 178 181 183 184 187 ...

result:

ok answer = 919999992

Test #63:

score: 0
Accepted
time: 3ms
memory: 3904kb

input:

196 388 5
187 7
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

72
6 7 10 13 18 23 25 26 29 30 31 32 35 40 44 46 48 49 54 56 58 59 61 63 65 66 70 72 73 75 76 81 87 91 92 94 99 103 105 106 115 116 119 121 124 126 130 131 134 135 136 139 141 142 143 147 149 151 153 156 158 163 164 173 179 180 181 182 183 187 194 196 

result:

ok answer = 719999998

Test #64:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

195 386 5
102 166
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

77
6 8 13 15 17 19 21 22 23 25 29 31 32 33 34 35 39 41 42 46 49 51 56 57 59 65 67 69 70 72 74 76 79 80 82 86 90 96 97 98 101 102 105 108 109 110 114 120 122 125 131 132 133 134 136 137 139 140 145 149 150 153 155 157 159 160 161 162 166 168 176 178 183 186 190 191 192 

result:

ok answer = 769999996

Test #65:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

195 386 5
125 20
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999997 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

87
2 3 8 9 11 15 18 19 20 24 27 28 29 33 34 38 43 44 46 51 54 56 60 63 64 65 67 68 75 76 79 81 82 83 86 87 88 89 90 93 94 95 96 97 101 102 103 104 107 111 112 113 115 117 122 125 127 129 130 131 134 136 144 145 146 147 149 156 158 160 162 163 164 167 170 171 174 177 180 182 185 188 189 191 192 193 194 

result:

ok answer = 869999994

Test #66:

score: 0
Accepted
time: 3ms
memory: 3944kb

input:

196 388 5
21 70
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 100000...

output:

92
1 3 4 5 8 10 12 14 17 18 19 21 23 26 27 30 31 35 38 40 41 47 48 49 54 57 58 59 61 63 66 67 70 73 75 76 77 80 81 83 84 85 87 89 90 92 93 95 96 98 99 100 101 102 103 104 105 106 110 112 120 121 123 126 128 129 132 139 140 142 147 151 152 156 157 158 160 163 164 166 167 169 170 172 174 179 182 185 1...

result:

ok answer = 919999994

Test #67:

score: 0
Accepted
time: 3ms
memory: 3868kb

input:

195 386 5
55 65
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

67
3 6 7 8 9 11 12 14 15 19 22 25 27 31 41 42 44 46 48 49 51 52 55 57 58 59 63 65 68 70 72 77 78 81 83 86 90 100 102 103 106 112 116 117 118 120 126 130 131 136 141 145 150 153 156 159 160 164 165 167 172 176 182 184 185 190 192 

result:

ok answer = 669999993

Test #68:

score: 0
Accepted
time: 3ms
memory: 3912kb

input:

200 396 5
66 167
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

87
1 8 11 15 16 17 20 22 23 25 27 30 34 37 38 41 42 44 45 48 49 50 53 54 56 60 62 63 64 65 66 67 71 79 80 81 84 87 88 89 94 97 98 102 103 104 106 107 112 113 116 117 118 119 122 129 134 137 138 140 142 148 152 153 155 157 158 161 162 163 165 167 171 173 176 180 181 182 183 184 185 186 187 191 192 19...

result:

ok answer = 869999990

Test #69:

score: 0
Accepted
time: 3ms
memory: 3908kb

input:

198 392 5
30 90
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

77
2 5 11 15 18 20 23 26 27 28 29 30 32 33 34 36 37 40 41 52 53 62 64 69 70 74 75 78 80 81 82 84 88 89 90 92 93 94 97 99 100 101 109 110 111 118 120 121 122 124 128 131 132 136 138 140 142 146 148 149 152 155 161 168 169 173 176 179 184 185 188 189 191 192 193 194 195 

result:

ok answer = 769999998

Test #70:

score: 0
Accepted
time: 3ms
memory: 3832kb

input:

195 386 5
137 154
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

82
1 2 9 14 16 24 25 28 30 31 32 34 36 40 44 45 51 56 58 61 63 65 68 69 72 74 78 79 82 83 84 85 88 89 94 97 98 99 100 104 108 111 113 115 120 121 122 124 125 126 127 130 131 133 136 137 139 141 142 145 146 148 150 151 154 156 159 166 170 175 176 177 178 182 183 184 185 186 187 191 192 194 

result:

ok answer = 819999996

Test #71:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

198 392 5
159 73
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

77
1 2 4 6 9 11 12 13 14 18 22 23 24 34 35 37 43 47 48 56 57 61 62 63 64 67 73 78 81 87 89 94 97 98 100 102 112 113 114 116 122 127 129 132 134 135 136 137 138 139 141 142 145 146 147 148 149 152 153 154 156 159 161 162 163 164 166 169 170 173 174 177 182 185 191 196 197 

result:

ok answer = 769999995

Test #72:

score: 0
Accepted
time: 3ms
memory: 3884kb

input:

197 390 5
61 135
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

77
3 5 6 10 12 14 16 17 19 20 22 23 31 32 34 36 39 42 44 45 47 51 55 58 61 63 66 71 74 76 79 83 85 93 94 101 107 108 110 113 116 118 124 126 129 130 133 135 136 137 138 140 141 143 148 149 150 152 155 158 161 166 171 174 177 178 179 182 183 185 186 189 191 193 194 195 196 

result:

ok answer = 769999994

Test #73:

score: 0
Accepted
time: 3ms
memory: 3900kb

input:

198 392 5
98 170
10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

77
2 6 12 13 16 18 21 24 25 28 29 32 33 34 35 38 39 40 42 48 54 55 57 60 63 64 67 68 79 81 83 85 87 90 92 93 96 97 98 105 106 110 112 113 118 121 123 127 132 133 135 136 141 142 146 147 151 152 153 157 159 162 164 168 170 171 172 175 176 178 181 186 187 191 192 195 198 

result:

ok answer = 769999992

Test #74:

score: 0
Accepted
time: 3ms
memory: 3876kb

input:

199 394 5
181 62
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

82
1 3 4 6 12 14 15 16 17 18 21 22 30 31 34 35 40 41 42 52 53 54 55 56 57 59 60 62 63 67 71 72 77 80 82 83 84 86 92 94 102 103 106 108 112 114 115 116 120 122 123 126 129 131 136 138 140 142 145 147 148 150 151 153 154 157 163 164 165 167 168 174 178 179 181 185 186 189 191 193 194 197 

result:

ok answer = 819999992

Test #75:

score: 0
Accepted
time: 3ms
memory: 3880kb

input:

198 392 5
156 122
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

77
5 9 10 11 12 16 17 18 21 36 40 43 45 46 51 52 54 57 63 64 66 67 70 78 79 82 83 91 92 94 95 96 103 104 106 109 111 112 113 115 116 117 118 121 122 124 125 126 129 132 133 138 139 142 144 145 152 154 156 163 170 171 174 175 178 179 180 181 182 183 185 186 187 192 194 195 197 

result:

ok answer = 769999997

Test #76:

score: 0
Accepted
time: 1ms
memory: 3892kb

input:

198 392 5
140 139
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

72
1 4 19 20 23 24 25 26 31 34 35 40 44 45 47 48 50 52 56 58 59 65 67 70 71 73 74 76 77 80 84 85 87 95 99 103 105 106 107 108 109 111 112 115 117 118 121 130 131 136 137 139 140 141 145 146 159 163 164 166 168 175 182 184 186 187 189 190 191 192 194 197 

result:

ok answer = 719999995

Test #77:

score: 0
Accepted
time: 4ms
memory: 3888kb

input:

199 394 5
109 199
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100...

output:

77
1 10 18 25 26 28 32 38 39 40 41 42 44 46 48 53 59 60 61 67 68 69 72 82 83 86 88 95 96 99 104 106 107 109 111 113 114 116 118 119 121 122 124 125 126 127 129 130 131 135 136 137 138 139 143 144 145 149 156 158 159 160 162 164 165 174 175 176 177 178 180 184 191 195 196 198 199 

result:

ok answer = 769999997

Test #78:

score: 0
Accepted
time: 2ms
memory: 3904kb

input:

196 388 5
165 144
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

82
1 3 4 6 7 8 9 13 14 20 27 28 37 39 41 43 45 47 49 50 51 56 57 59 64 65 67 68 69 73 75 76 77 79 80 82 83 85 86 90 94 95 99 105 108 113 115 116 118 121 122 128 129 132 138 142 143 144 145 146 150 154 156 161 162 165 166 168 169 173 174 175 180 183 184 185 187 191 192 193 195 196 

result:

ok answer = 819999992

Test #79:

score: 0
Accepted
time: 2ms
memory: 3836kb

input:

199 394 5
25 11
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #80:

score: 0
Accepted
time: 3ms
memory: 3868kb

input:

196 388 5
48 159
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

67
2 12 15 16 17 18 20 21 22 27 29 39 43 48 53 55 56 57 64 67 71 72 74 79 80 81 82 86 91 94 95 101 103 104 107 109 110 115 116 118 124 126 128 129 138 141 148 151 156 159 160 161 163 164 166 170 176 178 179 180 183 184 188 190 193 195 196 

result:

ok answer = 669999987

Test #81:

score: 0
Accepted
time: 1ms
memory: 5604kb

input:

197 390 5
45 165
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #82:

score: 0
Accepted
time: 3ms
memory: 3892kb

input:

200 396 5
43 90
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

72
4 8 9 10 11 17 20 22 25 26 28 31 33 34 36 38 39 40 43 44 45 51 54 55 56 57 59 60 63 66 71 73 75 77 85 90 101 102 111 119 120 123 126 130 134 136 138 139 146 148 149 150 151 153 159 161 165 167 168 169 175 177 178 183 184 186 187 190 191 194 197 198 

result:

ok answer = 719999995

Test #83:

score: 0
Accepted
time: 1ms
memory: 3872kb

input:

197 390 5
73 158
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999999 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000...

output:

77
1 2 5 15 16 22 23 25 26 27 29 30 36 37 38 39 55 61 63 67 68 72 73 74 76 77 81 83 84 85 86 88 89 90 97 106 112 114 115 116 117 118 121 123 132 134 135 136 137 140 142 143 145 147 148 155 156 157 158 159 167 168 169 170 171 173 176 177 178 182 183 184 189 191 192 196 197 

result:

ok answer = 769999996

Test #84:

score: 0
Accepted
time: 0ms
memory: 5744kb

input:

197 390 5
4 1
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000000...

output:

72
1 4 15 16 19 21 24 29 34 42 47 48 49 51 56 60 66 67 74 76 77 78 79 82 85 92 94 95 98 100 103 105 107 109 110 111 113 114 115 119 120 121 122 126 130 132 134 135 143 145 147 150 152 153 157 158 165 166 170 172 173 174 179 181 184 185 190 192 193 194 196 197 

result:

ok answer = 719999995

Test #85:

score: 0
Accepted
time: 3ms
memory: 5748kb

input:

198 392 5
37 94
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 9999998 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 100000...

output:

-1

result:

ok answer = IMPOSSIBLE

Test #86:

score: 0
Accepted
time: 3ms
memory: 3832kb

input:

197 390 5
72 163
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 1000...

output:

92
1 7 9 12 14 16 17 18 19 20 23 29 31 33 35 40 41 44 46 49 51 54 59 60 64 65 66 68 69 70 71 72 74 82 83 84 85 88 89 94 95 98 99 101 104 105 107 109 110 111 112 114 116 117 119 121 122 124 128 130 131 134 138 139 140 143 145 147 151 153 154 155 156 157 159 160 161 163 164 167 171 173 174 178 180 182...

result:

ok answer = 919999992

Test #87:

score: -100
Wrong Answer
time: 0ms
memory: 3632kb

input:

188 323 1
170 150
32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 32151 ...

output:

15
1 6 12 32 54 69 114 123 125 128 149 154 165 171 174 

result:

wrong answer User answer is not optimal; judge: 192906, user: 482265