QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#73976#5447. 鸽子Qingyu100 ✓205ms37128kbC++146.9kb2023-01-29 22:44:112023-09-11 03:39:01

Judging History

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

  • [2023-09-11 03:39:01]
  • 管理员手动重测该提交记录
  • 测评结果:100
  • 用时:205ms
  • 内存:37128kb
  • [2023-08-28 23:46:05]
  • 管理员手动重测该提交记录
  • 测评结果:100
  • 用时:220ms
  • 内存:36008kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-29 22:51:36]
  • 评测
  • 测评结果:100
  • 用时:1276ms
  • 内存:28140kb
  • [2023-01-29 22:44:11]
  • 提交

answer

#include <string>
#include <vector>
#include <cassert>
#include <cstring>

//you may define some global variables, but it does not work if you try to transfer any information from function pigeon_num or send to function receive through these variables.

bool add(__uint128_t &x, __uint128_t y){
	if(x<=~y){
		x+=y;
		return 0;
	}
	else{
		x=0;
		x=~x;
		return 1;
	}
}

__uint128_t f[1444][5];
__uint128_t g[1444][5];
__uint128_t sum[1444][5][1444];
int type[2111];
const int to[4][5]={
	{-1,-1,-1,3,2},
	{2,3,2,3,2},
	{-1,1,0,1,0},
	{0,1,0,1,0}
};
const char col[6]="1100";

class Init{
    const static int L=1300;
public:
    int m;
	Init(int k){
		//you may do some initialization for RECEIVE function here
        int i=0;
        memset(f,0,sizeof(f));
        f[0][1]=1;
        f[0][3]=1;
        for(int j=1;j<=2*k;++j)type[j]=0;
        for(int j=2*k+2;j<=3*k;++j)type[j]=2;
        for(int j=3*k+1;j<=L;++j)type[j]=4;
        type[2*k+1]=1;
        for(int j=4*k+2;j<=L;j+=2*k+1)type[j]=3;
        int ok=0;
        while(!ok){
            for(int t=0;t<4;++t){
                if(f[i][t]){
                    auto tmp=f[i][t];
                    for(int j=1;i+j<=L;++j){
                        if(to[t][type[j]]!=-1){
                            add(f[i+j][to[t][type[j]]],tmp);
                        }
                    }
                }
            }
            ++i;
            __uint128_t tmp=0;
            for(int t=0;t<4;++t){
                ok|=add(tmp,f[i][t]);
            }
        }
        m=i;
        for(int j=0;j<4;++j){
            g[m][j]=1;
        }
        for(int i=m-1;i>=0;--i){
            for(int t=0;t<4;++t){
                g[i][t]=0;
                for(int j=1;i+j<=m;++j){
                    sum[i][t][j]=sum[i][t][j-1];
                    if(to[t][type[j]]!=-1){
                        add(g[i][t],g[i+j][to[t][type[j]]]);
                        add(sum[i][t][j],g[i+j][to[t][type[j]]]);
                    }
                }
            }
        }
	}
};

/*
Taskid:         The index of the subtask. If it is subtask 2, then Taskid=2.
k:              The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
return value:   The number of pigeons Little E will use.
*/
int pigeon_num(int Taskid, int k){
	//you may do some initialization for SEND function here
	Init init(k);
	return init.m;
}

/*
Taskid:         The index of the subtask. If it is subtask 2, then Taskid=2.
n:              The number of pigeons Little E will use. This equals the return value of function pigeon_num.
k:              The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
msg:            The content of the message.
return value:   The order of the pigeons taking off. The length of this string must be n. return_value[i]='0' means the (i+1)-th pigeon taking off is black. return_value[i]='1' means the (i+1)-th pigeon taking off is white.
*/
std::string send(int Taskid, int n, int k, __uint128_t msg){
	int st=1;
    int now=0;
    std::string ret;
    if(msg>=sum[0][1][n]){
        st=3;
        msg-=sum[0][1][n];
    }
    while(now<n){
        int ans=-1;
        for(int l=1,r=n-now,mid=l+r>>1;l<=r;mid=l+r>>1){
            if(msg<sum[now][st][mid])ans=mid,r=mid-1;
                else l=mid+1;
        }
        assert(ans!=-1);
        ret+=std::string(ans, col[st]);
        msg-=sum[now][st][ans-1];
        st=to[st][type[ans]];
        now+=ans;
    }
    return ret;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int _next[2222][2];
const auto next=_next+1;

/*
Taskid:         The index of the subtask. If it is subtask 2, then Taskid=2.
k:              The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
msg:			The order of the pigeons landing. Its length is equal to n. msg[i] denotes the color of the (i+1)-th pigeon watched landing by Little F. '0' means black and '1' means white.
return value:	The content of the message. It should be correct.
*/
__uint128_t receive(int Taskid, int k, const std::string &msg){
	const static Init init(k);
    int n=msg.size();
    next[n-1][0]=next[n-1][1]=n;
    for(int i=n-2;i>=-1;--i){
        next[i][0]=next[i+1][0];
        next[i][1]=next[i+1][1];
        next[i][msg[i+1]-'0']=i+1;
    }
	int tofind=0;
    int now=-1;
    std::string code;
    while(1){
        //printf("%d\n",now);
        if(next[now][tofind]==n){
            while(code.size()<n){
                code+=tofind^'1';
            }
            break;
        }
        std::vector<int> pl;
        for(int i=1;i<=2*k+1&&next[now][tofind]<n;++i){
            now=next[now][tofind];
            pl.push_back(now);
        }
        if(pl.size()==2*k+1&&pl[k]-pl[0]<=2*k&&pl[2*k]-pl[k]<=2*k){
            while(code.size()<pl[k]-k){
                code+=tofind^'1';
            }
            while(code.size()<pl[k]+k+1){
                code+=tofind^'0';
            }
        }
        else{
            int realnum=pl.size();
            int near=pl[0]<=code.size()+k;
            if(!near){
                int left=code.size()+(pl[0]-code.size()+k)/(2*k+1)*(2*k+1);
                for(int i=1;i<pl.size();++i){
                    if(pl[i]-left>i+k){
                        realnum=i;
                        break;
                    }
                }
            }
            else{
                for(int i=1;i<pl.size();++i){
                    if(pl[i]-code.size()>i+k){
                        realnum=i;
                        break;
                    }
                }
            }
            if(!near||code.size()==0){
                int num1=(pl[0]-code.size()+k)/(2*k+1)*(2*k+1);
                code+=std::string(num1, tofind^'1');
                code+=std::string(realnum, tofind^'0');
                if(code.size()==n){
                    break;
                }
                code+=std::string(2*k+1, tofind^'1');
                now=code.size()-1;
            }
            else{
                code+=std::string(realnum, tofind^'0');
                now=pl[realnum-1];
            }
        }
    }
    __uint128_t ans=0;
    int st=1;
    if(code[0]=='0')ans=sum[0][1][n],st=3;
    int pre=0;
    int len=1;
    for(now=0;now<n;++now){
        if(now==n-1||code[now]!=code[now+1]){
            ans+=sum[pre][st][len-1];
            pre+=len;
            st=to[st][type[len]];
            len=1;
        }
        else{
            ++len;
        }
    }
    return ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0.01
Accepted

Test #1:

score: 0.01
Accepted
time: 94ms = 5ms + 89ms
memory: 22572kb,32124kb

input:

encode
0 6 1 444386057
1259251521813 3478565260041 1380014506318

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
0 6 10000 546
0 276971377145151614 292663607167057667 17293958839841062927 13907081008261496844 15199781617958407 284281067295080452 138572823805808 71213229765951480 2146967551
0 3548839358494769220 17285096844832735226 202662343631568896 14987976407383572480 10539901233027091191 71472450441...

result:

ok Accepted using 546 pigeon(s).

Subtask #2:

score: 3.99
Accepted

Test #2:

score: 3.99
Accepted
time: 188ms = 21ms + 167ms
memory: 11404kb,29552kb

input:

encode
1 20 1000 429620070
0 0 720
0 0 312
0 0 746
0 0 460
0 0 449
0 0 778
0 0 877
0 0 951
0 0 40
0 0 836
0 0 436
0 0 440
0 0 694
0 0 3
0 0 124
0 0 123
0 0 812
0 0 848
0 0 569
0 0 46
0 0 144
0 0 930
0 0 703
0 0 830
0 0 198
0 0 1023
0 0 291
0 0 804
0 0 356
0 0 122
0 0 77
0 0 162
0 0 337
0 0 461
0 0 3...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
1 20 10000 1277
163 562950221856768 140737488486400 8 9223372036854775808 4611686018428436480 562949953454080 16777216 35184372088832 4611688217450643584 2048 2064 0 9223372036854784000 9223372036854775808 144116287587483649 34359738368 133120 8192 2307896972164071424 2251800082120704
927 879...

result:

ok Accepted using 1277 pigeon(s).

Subtask #3:

score: 12
Accepted

Test #3:

score: 12
Accepted
time: 58ms = 4ms + 54ms
memory: 9436kb,11676kb

input:

encode
2 1 1000 436825046
0 0 600068
0 0 609400
0 0 1024294
0 0 791018
0 0 906125
0 0 350192
0 0 938169
0 0 978316
0 0 498345
0 0 859442
0 0 990072
0 0 996124
0 0 1013379
0 0 383142
0 0 355230
0 0 636760
0 0 138612
0 0 1014140
0 0 116388
0 0 286851
0 0 689038
0 0 996312
0 0 872409
0 0 137655
0 0 165...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
2 1 10000 206
615 5225447722303390865 1229628951656728648 9530818049588238576 2178
431 5801907666951622736 9530822189864223876 4974305264939794472 9809
555 5787213826857390353 307459753536458833 310823489245669562 11592
548 5226713808747693317 653097024422446340 10449767652297850147 1921
797 ...

result:

ok Accepted using 206 pigeon(s).

Subtask #4:

score: 12
Accepted

Test #4:

score: 12
Accepted
time: 56ms = 7ms + 49ms
memory: 9136kb,13012kb

input:

encode
3 1 1000 387247419
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
74 4919131804529607760 5841468956673901829 310823437504365829 2751
276 4922734581151502609 361488933526245444 5837880147487035460 2351
16 10398891327491736713 361700363894540553 1229628401892233361 645
447 10414864721034907793 1172220429134481545 1172361493241989396 7720
318 955...

result:

ok Accepted using 206 pigeon(s).

Test #5:

score: 12
Accepted
time: 44ms = 7ms + 37ms
memory: 9140kb,11576kb

input:

encode
3 1 1000 713192400
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 87960930...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
471 4536644332211389899 10428788079301492738 15064294435024015359 13564
606 6843454911653332391 9564096680271806465 15066563809839683583 28
877 6878498494686929831 4953043980936282114 15280484807176359934 1029
471 6843470252980806599 9546645225399123970 15136211272246235135 1356...

result:

ok Accepted using 206 pigeon(s).

Test #6:

score: 12
Accepted
time: 65ms = 7ms + 58ms
memory: 9212kb,11652kb

input:

encode
3 1 1000 645075111
4246499090569 7193484617445 1510706984766
4246499090569 7193484616421 1510706984766
277774756708 6376504105378 5077007084953
277774756708 6376504105378 5077006036377
2169844955743 2934781145354 222052734700
2169844955743 2934781145354 153333257964
1832565011110 407610944436...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
708 13040868583185713156 5482576059935322239 17383962870941438080 16375
473 18211712598521610008 5746448160888786819 14123296690522911053 4064
7 13835621003325095679 9388016394991189946 2880088185521602336 383
878 12346430725912398845 5289659278425620570 6891106801543205911 1498...

result:

ok Accepted using 206 pigeon(s).

Test #7:

score: 12
Accepted
time: 56ms = 3ms + 53ms
memory: 10412kb,11584kb

input:

encode
3 1 1000 796959971
757876296036 803151227108 5906999289291
757876427108 803151227108 5906999289291
414948469704 2976884394850 4112975556107
689826376648 2976884394850 4112975556107
2550229927214 632225161890 3388963947500
2550229796142 632225161890 3388963947500
3575646418173 3779536410297 44...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
359 6494289644481717285 8817766391428843695 4718294014619921402 5760
829 15799791501989686996 10082047461610596354 3351087146977980078 8228
505 5625551184738672767 17269180218930626553 9099699468380470927 250
750 5564446943757924959 8791293557231995287 14176742699049681027 13688...

result:

ok Accepted using 206 pigeon(s).

Test #8:

score: 12
Accepted
time: 62ms = 4ms + 58ms
memory: 9436kb,11676kb

input:

encode
3 1 1000 693059695
4048401499258 4987348031799 3275997589762
134993019813 7423310534504 8175994939428
2365792583990 619504649447 278990350194
2186070068696 87980415538 8540777555842
312290816283 4681173122127 3515380653989
1091271851038 7859252399813 5032803532911
4224470394765 5800962600676 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
75 15313376681791924415 18434774810441404794 6914253671177527898 2409
409 12287111206983574039 18289118157795327819 11625268388136878080 1493
688 18188068020223213185 6491103032220830036 5262593845097592896 960
448 13358520847485252172 4361252669252814592 2188599898221673619 125...

result:

ok Accepted using 206 pigeon(s).

Test #9:

score: 12
Accepted
time: 65ms = 8ms + 57ms
memory: 10720kb,13172kb

input:

encode
3 1 1000 996974621
1465918033995 8457101583533 2732887869300
2047477281607 457558740065 82047769421
3369612178778 5142868648775 7112435514295
1676953693797 8303977116040 3379317631238
1270351245252 8087071185611 3752267838689
1099073829021 3918060109511 196597372399
1805633566742 231697456066...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
883 5030884315856101087 4779831851408822276 9945227034871556778 8528
151 13548171836390191104 2310360104800632743 4593757903663168573 488
41 15799369309378707616 11740679318886225728 1355734481867792005 6999
507 17678131867717823753 666673685567610884 9556741053617319261 16362
8...

result:

ok Accepted using 206 pigeon(s).

Test #10:

score: 12
Accepted
time: 59ms = 8ms + 51ms
memory: 9436kb,11640kb

input:

encode
3 1 1000 467567359
1075396360258 2757333265695 4398049088394
3728381695575 7402391548472 4514883918814
1374799011090 7647171217921 190123995147
44790216706 5313744955794 3750821258544
3674429288572 5398376745208 3178068241044
1260815866700 2230538451318 1717701836490
1044427370366 52834961469...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
52 13051754953978481598 11912207376953934871 4636122341145989780 8705
110 16145541586518584015 18032289504244810127 645412850648334833 15924
288 17289900953782279156 3179292850591436741 17942085379872571052 15536
634 13903050294181330301 4602805954432854525 1144970095357795396 1...

result:

ok Accepted using 206 pigeon(s).

Test #11:

score: 12
Accepted
time: 62ms = 8ms + 54ms
memory: 9424kb,13896kb

input:

encode
3 1 1000 598036788
3547997613716 7162316100081 8474994690705
4217635124842 180044937399 6937652241686
408564532613 557239564866 425308736666
2835923397344 4287732741367 456253791399
3227938616436 6128713171348 7177177432788
1374104573980 5915479646691 6151311367707
3059957757246 6306455341132...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
88 17861021049094137862 10686094266918961151 14123226294059659359 2036
262 15415246158499085952 861403038733822549 430854787445696553 360
101 17971751214871556028 10762820194599428104 16393542250577020815 4344
974 4827666568637406849 9125827783160758255 16933460957303477933 4631...

result:

ok Accepted using 206 pigeon(s).

Test #12:

score: 12
Accepted
time: 57ms = 8ms + 49ms
memory: 9136kb,13604kb

input:

encode
3 1 1000 28894740
1443566967277 1002989687681 1829524951402
2602826929142 3747227685123 5901648707775
4033961264703 2505460965674 954993702922
197504067048 6474213203300 591897838873
397555092326 6176213152642 6542025690412
3023274830786 7743011454513 4574767952956
970089917475 7440994416681 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
226 17941472017855871034 4612315626483695749 1765411947503683488 8215
88 18055129170713581050 6822158525089617911 15379028267840819204 5290
310 12345978537762098167 12147686250738697705 8816523516103908613 13348
344 14267333798591994893 18442293201295317752 1089670390986695769 6...

result:

ok Accepted using 206 pigeon(s).

Test #13:

score: 12
Accepted
time: 54ms = 4ms + 50ms
memory: 9140kb,13600kb

input:

encode
3 1 1000 153075579
2304211383706 293736539527 7132134054812
1741814038249 7432048048225 3566201720196
3995524894037 6019268388144 2122308190778
991763611900 7426700545379 6238866569725
1785152478736 8261949307035 7941066811713
1698097536347 6572651164624 728515473256
2495922753108 73793558276...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
486 18020961843884982789 11542418381929627265 6539123481742398472 9515
236 9430542209435352331 1148410621739901411 18372467665243348624 4138
798 17608310060988061140 9550906468431321690 10702137615446051394 4468
129 15261014633362801140 2330753673504751363 15856925784120229707 8...

result:

ok Accepted using 206 pigeon(s).

Test #14:

score: 12
Accepted
time: 62ms = 8ms + 54ms
memory: 9140kb,13204kb

input:

encode
3 1 1000 894332930
2955022174032 3761127475788 6784502660817
1358878196429 7041902343860 5015929060416
285458360642 2724603455779 7746008164623
2279314129864 6384657611867 2131794287371
257082688144 5238759256510 2566576491022
2169514347865 3464239198787 8180660151008
2545389745640 3215011118...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
741 16212822311076374575 1045122359767711984 2206560716561413135 8192
71 17422456769411285744 13428951111853177090 13834794043630659339 14840
584 6177270019860475543 11743037072009247402 3080363186744993130 4399
129 9243647581030588905 13209033638455820180 1054152477722560673 79...

result:

ok Accepted using 206 pigeon(s).

Test #15:

score: 12
Accepted
time: 66ms = 8ms + 58ms
memory: 10432kb,12976kb

input:

encode
3 1 1000 870750617
2049300775717 3418691816781 170555247826
2138475130880 5872645360995 1575658908453
640612892047 8076474179327 4264407368088
887395543201 1149225882701 2807256545780
944441053874 6589872600342 4383690630196
2114663508024 5302653587328 6229477040546
3336805585458 774686815837...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
652 10366726021786394744 13985419002316201512 9208233688977767529 4596
12 8795105836459499488 13705019947934263243 5550765293292232902 259
540 13044094979577736610 17588426905116028925 3457110868463834273 8096
422 6513863160129128663 14420455706748058809 1146168785175793409 1585...

result:

ok Accepted using 206 pigeon(s).

Test #16:

score: 12
Accepted
time: 50ms = 7ms + 43ms
memory: 10576kb,11868kb

input:

encode
3 1 1000 247578299
632583137590 7703348930412 784707894348
632583137590 7703348930412 784707894349
632583137590 7703348930412 784707894350
632583137590 7703348930412 784707894351
632583137590 7703348930412 784707894352
632583137590 7703348930412 784707894353
632583137590 7703348930412 7847078...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
179 5423564601598159541 6602372316902790789 8803398458425251282 14871
375 5156726320462830201 7476141494391150341 8974536068900754400 7768
681 5426942298097461941 6602372316896499333 8803399283058578939 16042
709 10036341661842807416 15537584827380141829 15892068944966870003 126...

result:

ok Accepted using 206 pigeon(s).

Test #17:

score: 12
Accepted
time: 42ms = 3ms + 39ms
memory: 11144kb,12976kb

input:

encode
3 1 1000 274474902
3167682591029 7992474326625 3651930268966
3167682591029 7992474326625 3651930268967
3167682591029 7992474326625 3651930268968
3167682591029 7992474326625 3651930268969
3167682591029 7992474326625 3651930268970
3167682591029 7992474326625 3651930268971
3167682591029 79924743...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
554 18024742171312644000 2413941509962981630 4099843597906706432 4007
347 18033749095705730976 2413941518569689470 6405117060164435968 8703
46 18051200544128090016 738601906358374781 6148911076325277707 15018
973 18024671525559328672 756611898214572414 4135302847968559686 1856
4...

result:

ok Accepted using 206 pigeon(s).

Test #18:

score: 12
Accepted
time: 49ms = 0ms + 49ms
memory: 9140kb,11584kb

input:

encode
3 1 1000 18588105
3133225748585 1596243425390 5250091065049
3133225748585 1596243425390 5250091065050
3133225748585 1596243425390 5250091065051
3133225748585 1596243425390 5250091065052
3133225748585 1596243425390 5250091065053
3133225748585 1596243425390 5250091065054
3133225748585 159624342...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
485 18158451367048193453 1371311613499772991 16272061791011341629 376
133 18158420614110332269 4939270756564812895 15191476049103292762 2646
284 18158420614110319981 1480506242744271967 15191476049103292762 3029
698 18374593396224116077 1480506242744275039 15191476049103292767 4...

result:

ok Accepted using 206 pigeon(s).

Test #19:

score: 12
Accepted
time: 49ms = 3ms + 46ms
memory: 9140kb,11572kb

input:

encode
3 1 1000 845512879
1567990344849 585423451066 7710202686455
1567990344849 585423451066 7710202686456
1567990344849 585423451066 7710202686457
1567990344849 585423451066 7710202686458
1567990344849 585423451066 7710202686459
1567990344849 585423451066 7710202686460
1567990344849 585423451066 7...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
120 14119303304136595390 9498253388948885448 142095368289300776 4047
221 14119267844886597566 9646872066845233096 142252598586272040 15
375 11955569725210580926 9642370116769986472 213167791445551658 2743
382 11955569725210580926 9642370116367333282 213167791445551274 8948
472 1...

result:

ok Accepted using 206 pigeon(s).

Test #20:

score: 12
Accepted
time: 38ms = 0ms + 38ms
memory: 10760kb,11572kb

input:

encode
3 1 1000 51521257
1711052453544 163643731485 4994453213835
1711052453544 163643731485 4994453213836
1711052453544 163643731485 4994453213837
1711052453544 163643731485 4994453213838
1711052453544 163643731485 4994453213839
1711052453544 163643731485 4994453213840
1711052453544 163643731485 49...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
445 11593316845687674826 64509460083811983 17431960412471983710 3945
831 11625332562735536041 95893376916433559 16927524268824116575 13672
827 11625332562735929257 95893376916433559 16927524268823330143 13687
398 13894654194763435973 63928917943756559 17505990663513603644 13
59 ...

result:

ok Accepted using 206 pigeon(s).

Test #21:

score: 12
Accepted
time: 47ms = 7ms + 40ms
memory: 9144kb,13052kb

input:

encode
3 1 1000 695519242
2535264499835 7394105938009 7092345870659
2535264499835 7394105938009 7092345870660
2535264499835 7394105938009 7092345870661
2535264499835 7394105938009 7092345870662
2535264499835 7394105938009 7092345870663
2535264499835 7394105938009 7092345870664
2535264499835 73941059...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
3 1 10000 206
557 16157824741331888380 1158571793208865924 8412592137403228161 8855
661 16157824743455385978 1164191431015823440 8412596545652383746 12336
97 15013365078054103418 298401856554579204 13024212186796052503 15616
634 15004920831059652988 586614640050468104 8394577740555276289 1280...

result:

ok Accepted using 206 pigeon(s).

Subtask #5:

score: 12
Accepted

Test #22:

score: 12
Accepted
time: 70ms = 5ms + 65ms
memory: 11812kb,16652kb

input:

encode
4 2 1000 104801283
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
596 2883009650171584672 9232522722922364968 180187976299487242 36602744773673120 138624192
877 9804479327579964432 2450103883125653540 2324420977259323400 9376503392614515716 109051904
970 2351019914816399362 585610922976903688 146938742662766600 2882875679396462722 204684505
24...

result:

ok Accepted using 284 pigeon(s).

Test #23:

score: 12
Accepted
time: 72ms = 9ms + 63ms
memory: 11848kb,16648kb

input:

encode
4 2 1000 66331895
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 879609302...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
332 7435446309160536448 7493761093374043781 11525562002031052801 907655547583486 104044544
467 5706071808910843392 5764537225762043012 9220281018145640449 701625907543935 141492415
710 2287839691724045568 3458571009238234148 13833967864268496904 701557188198143 70264959
570 3990...

result:

ok Accepted using 284 pigeon(s).

Test #24:

score: 12
Accepted
time: 61ms = 0ms + 61ms
memory: 11820kb,16660kb

input:

encode
4 2 1000 12437286
3164361319777 6786891624731 227951509421
3164361319777 6786891624731 227951508397
1230006084290 4045001029920 8621280727007
1230006084290 4045001029928 8621280727007
4046842697365 1390215476350 5393775095343
4046842697365 1390215476478 5393775095343
4097065576578 85543456262...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
319 2341900337809044272 4702609528587837443 3693376161666023220 3746999392844989287 50541415
137 9155825189496743423 13961545866591274495 9943918298742131269 5763193834568023808 46137351
643 16019306576195289092 5761299243948965889 18394970304668516324 216180392958766487 2680423...

result:

ok Accepted using 284 pigeon(s).

Test #25:

score: 12
Accepted
time: 71ms = 10ms + 61ms
memory: 13860kb,17680kb

input:

encode
4 2 1000 831242687
2670751381596 6623724975677 5092794651405
2670751381596 6623724975677 5092794127117
1139436948020 3121545543053 885256774465
1139436948020 3190265019789 885256774465
974698645962 3392494041520 6639045777535
974698645962 3392494040496 6639045777535
2184536160052 917915127054...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
293 11102506114671650511 11099227412437245951 17987852753237442648 5801079841461686259 67960625
411 16027360872862254092 14728967084994463832 468370793873437441 11413937037267697792 47079527
546 14816815079990968216 1198309789587700198 14959283131036952563 4854880542213263356 22...

result:

ok Accepted using 284 pigeon(s).

Test #26:

score: 12
Accepted
time: 63ms = 6ms + 57ms
memory: 13148kb,16372kb

input:

encode
4 2 1000 803182167
1426439266935 7147157177216 7945335051695
607249308402 1447808532116 3736648115736
207234513439 5004460544995 5537073429154
3074118080154 4079481191752 3706576729333
975146501509 7461545836951 5502998616237
3030364550217 4251411057338 6934111764745
1020239981246 33761119032...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
490 14702106537089833446 7464773701375893529 14815048397299171686 6918442994987185127 241221632
705 11186645928887038168 6918105243687535298 1872583542954164016 7507648459678154236 214954752
381 15914017957000257587 17510044822478507059 14699822851930650416 14874489729304654597 ...

result:

ok Accepted using 284 pigeon(s).

Test #27:

score: 12
Accepted
time: 68ms = 0ms + 68ms
memory: 11892kb,16660kb

input:

encode
4 2 1000 991085096
563753021851 4784678900190 3335506497405
1644840097098 5351993830124 231790270157
671666314877 2993478336278 4903634741739
3843280623293 5733732638419 3778094461242
4305486882696 2994888978439 4760928801966
632426533134 5845320353043 4547375939696
1935637722766 306974945046...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
511 4612101634365292096 37575551656921598 6617119374681734919 9259406855950778622 168160351
192 9637690484117712903 4791899549241709264 70232827245056612 941821886321920972 42895312
969 10957435608619707424 933163652745277443 4609856501611784296 4711216008909979647 261646128
185...

result:

ok Accepted using 284 pigeon(s).

Test #28:

score: 12
Accepted
time: 71ms = 10ms + 61ms
memory: 11876kb,16460kb

input:

encode
4 2 1000 805069258
3326421976718 3625496974456 1828193797217
1065612397495 5942441121524 4539471530132
2525415247779 6676587972998 2521601996734
2365770894474 8404715583823 4641885655005
818212274148 2502581781005 7593117904883
3101233769607 1680947096591 5400949677747
760263215344 2483586456...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
492 14412643635965855855 12283779071901428022 18269736530912149586 2883711316789820464 8293375
744 17392629080443715489 4580987748203387162 71783428065441316 4936927077754820880 218134734
995 3472268849003364099 9097583747246565656 2313810373263429553 6913246089472689535 2107586...

result:

ok Accepted using 284 pigeon(s).

Test #29:

score: 12
Accepted
time: 71ms = 3ms + 68ms
memory: 13272kb,18384kb

input:

encode
4 2 1000 645417977
2004661301788 8305084308581 7644592639657
1753411802060 8128520264301 5913333382220
273811111551 3017605920161 1213137986977
503199548839 6496884379990 1792439764221
1282564453374 7519802584808 1460238637289
2186643520750 7786551400276 1522926324983
2484806968152 5269299725...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
400 18388652940236689440 3743564400143892504 1873444116930232735 18445847094714420484 56688684
156 16082391322831511603 17528686183235090849 11651655769315629542 434174017651880943 162739200
576 17474660056210677634 9223759511367481869 17901674329054645389 9701527791114125358 38...

result:

ok Accepted using 284 pigeon(s).

Test #30:

score: 12
Accepted
time: 77ms = 7ms + 70ms
memory: 12112kb,16436kb

input:

encode
4 2 1000 185343146
1478720025915 3075643605492 6970909005046
1312075357012 5361785272194 8235932608943
3008983260685 7314822992164 7133191994541
4105205953227 6142229368998 6606851662014
1069656976274 1155535082911 7285720569718
1806146471357 7230378573782 8187177095087
4042494159151 75859574...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
519 3238961036105633893 17280167462587752448 3181912564691058684 15594866207336183296 140981248
345 13826631450190047251 16456442007585423617 575598265574379774 156555062700536527 264269823
597 11186938005564679683 4583326287914344448 113541353454894688 14984427643303102077 2147...

result:

ok Accepted using 284 pigeon(s).

Test #31:

score: 12
Accepted
time: 76ms = 5ms + 71ms
memory: 11876kb,18044kb

input:

encode
4 2 1000 29604663
1371036480781 4889043449636 7723873546637
32044687684 5517188585754 1114662443016
965930312361 4258588579758 6716222248695
1339896583368 3799297789470 1471023232170
184296716854 8606997530794 906346322433
1613210366866 1547107939122 409322094349
3444207503641 4064011960589 6...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
225 3477000937980303821 9441803762172264855 13367112558972226975 4152670755774659548 204727809
464 13801565850916716799 13906317469386538367 5764704249985955582 37518359392419330 200327295
433 15014930823423975940 10520428280631151357 10941498590069031119 16861406643619890293 23...

result:

ok Accepted using 284 pigeon(s).

Test #32:

score: 12
Accepted
time: 74ms = 7ms + 67ms
memory: 14156kb,18384kb

input:

encode
4 2 1000 713687453
2383867188749 7057439171668 7628477556170
4115168701479 3052137979956 8157903548674
1644862632766 3976177853114 2122216960597
3079626480602 6610931908901 3022623848174
165634141718 3104656224912 774808611371
4027407955150 6122686031528 7528652348904
3762003432157 6948539156...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
251 17005469004694837160 4611545368569707553 5242055731286442002 1152643327305173601 4307035
503 3098469293525305152 9439526959418817304 9664728923740831704 10136895900155902 24918008
440 17942410941125626819 8321835481418432827 9081508760714996830 1722820380112976391 251756434
...

result:

ok Accepted using 284 pigeon(s).

Test #33:

score: 12
Accepted
time: 72ms = 10ms + 62ms
memory: 13040kb,16428kb

input:

encode
4 2 1000 260896627
3172912227189 2469961514725 8682356929489
1787732982182 6079564684574 3342761373868
1898890950377 2827440158445 2343608444745
4359234975989 2621421141815 3301614944521
2646411140702 8719064543979 4136930809142
496415326337 6287785164698 6464256243721
2877009541956 407864720...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
917 16573366058772177313 9229019156493171120 12732358496674755382 7351572582284918978 3407743
571 18348786199658956256 13800432574402765250 16141012126950525447 17618569929933471860 178264575
57 11179851614019126116 17582050742743696066 14533819671442259980 17979284560898129913 ...

result:

ok Accepted using 284 pigeon(s).

Test #34:

score: 12
Accepted
time: 52ms = 0ms + 52ms
memory: 13836kb,16360kb

input:

encode
4 2 1000 505721487
80192402644 864317530628 3128268922446
80192402644 864317530628 3128268922447
80192402644 864317530628 3128268922448
80192402644 864317530628 3128268922449
80192402644 864317530628 3128268922450
80192402644 864317530628 3128268922451
80192402644 864317530628 3128268922452
8...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
230 9371984878309990142 144162810673334008 81104382252824562 2281847266668954432 71294975
286 2356505271582321662 288256352114116076 162166979743987692 2281495423208100192 136303743
671 4688244011066977275 2305873520661955576 360360544499146744 2297258020695949920 104861696
363 ...

result:

ok Accepted using 284 pigeon(s).

Test #35:

score: 12
Accepted
time: 63ms = 4ms + 59ms
memory: 11884kb,16364kb

input:

encode
4 2 1000 1003007062
1782849581023 728320270385 7922299235072
1782849581023 728320270385 7922299235073
1782849581023 728320270385 7922299235074
1782849581023 728320270385 7922299235075
1782849581023 728320270385 7922299235076
1782849581023 728320270385 7922299235077
1782849581023 728320270385 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
205 14589460033258396154 3355129083450065152 6920884748953092250 36099208701547283 268187640
207 16333492165940481017 3916970867757646080 10379662467185016985 9024817206658827 267986864
673 11179837269406128627 7274327149548298368 1736672036994678979 144185612640997580 254909632...

result:

ok Accepted using 284 pigeon(s).

Test #36:

score: 12
Accepted
time: 61ms = 9ms + 52ms
memory: 13364kb,16444kb

input:

encode
4 2 1000 675725573
1437082497085 456885847788 31252739935
1437082497085 456885847788 31252739936
1437082497085 456885847788 31252739937
1437082497085 456885847788 31252739938
1437082497085 456885847788 31252739939
1437082497085 456885847788 31252739940
1437082497085 456885847788 31252739941
1...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
75 13836284028870525630 5009690587427840319 16462926029911801649 8864213069618837505 203309056
941 11533822018385117885 5371385932417141151 15616280086087135025 8971740321432122369 258472223
882 3467993276526199612 15586110423437679007 14809581598836248371 4152325570325325318 83...

result:

ok Accepted using 284 pigeon(s).

Test #37:

score: 12
Accepted
time: 65ms = 9ms + 56ms
memory: 12112kb,17764kb

input:

encode
4 2 1000 126767270
1245962653741 2691797900845 8133405178197
1245962653741 2691797900845 8133405178198
1245962653741 2691797900845 8133405178199
1245962653741 2691797900845 8133405178200
1245962653741 2691797900845 8133405178201
1245962653741 2691797900845 8133405178202
1245962653741 26917979...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
703 3923484150788508688 2343454879646797619 4377891093988196326 7479372456565119183 57040999
66 3923550121486175248 2360343378375266099 4382113218638856166 7479636339355785422 114085119
828 3923484150788508928 2343454879772626739 4377891094483648486 7479372456565119183 51182003
...

result:

ok Accepted using 284 pigeon(s).

Test #38:

score: 12
Accepted
time: 58ms = 4ms + 54ms
memory: 11884kb,16360kb

input:

encode
4 2 1000 880983702
2279931903967 6541908512490 6184273749181
2279931903967 6541908512490 6184273749182
2279931903967 6541908512490 6184273749183
2279931903967 6541908512490 6184273749184
2279931903967 6541908512490 6184273749185
2279931903967 6541908512490 6184273749186
2279931903967 65419085...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
736 17311828583834984416 9802947160014997496 14981787096979406952 1157477870105252257 5242816
983 16735368175128948704 2888076238002146284 4601271417982058584 2307004089289920738 17055999
256 14758268284940609434 590114535592745446 14974327987547767173 9121534614412042 8586761
3...

result:

ok Accepted using 284 pigeon(s).

Test #39:

score: 12
Accepted
time: 57ms = 4ms + 53ms
memory: 12104kb,16312kb

input:

encode
4 2 1000 477333384
4004115610927 5230001698956 5641579845491
4004115610927 5230001698956 5641579845492
4004115610927 5230001698956 5641579845493
4004115610927 5230001698956 5641579845494
4004115610927 5230001698956 5641579845495
4004115610927 5230001698956 5641579845496
4004115610927 52300016...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
4 2 10000 284
810 16139075220641151481 11089779817341989920 1871668983194186593 9229594221206280198 134010988
538 13834514001863626746 10228308066143551648 1007399017886251597 9905368989687810 265822720
185 16139108205989961721 11089779817341988960 1871668983194186593 9229594221206280204 2682...

result:

ok Accepted using 284 pigeon(s).

Subtask #6:

score: 12
Accepted

Test #40:

score: 12
Accepted
time: 94ms = 8ms + 86ms
memory: 20356kb,29224kb

input:

encode
5 5 1000 711903075
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
724 360305566670652416 4612812261931634689 4399120515152 72057611221992448 4612812261931630597 4503600969547840 360287991665525232 68198858880
825 288802122202353664 5188217141630861344 4611704710125355008 576531138764342272 5764607806502111233 2251816993816656 72057611754669109...

result:

ok Accepted using 485 pigeon(s).

Test #41:

score: 12
Accepted
time: 91ms = 15ms + 76ms
memory: 21376kb,30124kb

input:

encode
5 5 1000 791198466
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 87960930...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
634 279227577021824899 16175838879541114816 1116909750277904446 9223372038666746911 567180874156859392 31384526542309372 2233785416217001952 133145543160
737 55283595259346902 9225483026171315255 9989636142834597824 9007200886329247 12774073314942779392 13838717937489797118 1282...

result:

ok Accepted using 485 pigeon(s).

Test #42:

score: 12
Accepted
time: 98ms = 14ms + 84ms
memory: 20596kb,30072kb

input:

encode
5 5 1000 535217819
3574057992359 4693833240049 463843292570
3574057992359 4693833240049 463843293082
2224581939326 2871155568889 472434410278
2224581939326 2871155564793 472434410278
891165833039 7350590981033 2367089640277
891165833039 7350590983081 2367089640277
3237831868001 4921476337187 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
295 18014398507400528647 14987988089628999687 9232165999443114023 18446735546053820540 136476620603407 4615899501587595015 13835603962675203971 137406414848
512 9506536344470167489 17294095394011023296 539307120544187296 8529803083679 18167309807768051711 17887734770027202527 12...

result:

ok Accepted using 485 pigeon(s).

Test #43:

score: 12
Accepted
time: 96ms = 13ms + 83ms
memory: 20396kb,29124kb

input:

encode
5 5 1000 110074396
2968020431340 38984439043 7275650730137
2968020300268 38984439043 7275650730137
1185947152669 8770585115014 2990225539406
1185947169053 8770585115014 2990225539406
3258847114832 4181426866311 7556487401761
3258847123024 4181426866311 7556487401761
951573334697 4098135621266...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
659 18158496638208049091 18379189014114596926 17879565398568468542 873553263007399873 17834280645337149567 16210707408476041343 17887734973973659840 4555276286
425 1302174574154612735 17293820095738413056 1587543046914965504 13809316290560395 7493990059192873472 5359283556109750...

result:

ok Accepted using 485 pigeon(s).

Test #44:

score: 12
Accepted
time: 92ms = 7ms + 85ms
memory: 21312kb,29048kb

input:

encode
5 5 1000 400304125
2156827574045 5407530234022 3227929724972
3693626111528 4595861400898 209273779787
92376227684 2666552272197 8123808387370
109086633168 6770077943846 2404536236556
2133788303408 5944552740164 6210620276521
381439508678 8477426294036 4585666874388
2778847816527 216266566829 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
787 508770417914150911 18445758911290556032 576776346492993535 9506958204743704583 13836149603839307520 4323526035716947471 18446744057049782303 4286832640
339 504420756902125564 2260807016563964959 18438009556559740431 18167241554286115840 69876154374290495 17861548804122148880...

result:

ok Accepted using 485 pigeon(s).

Test #45:

score: 12
Accepted
time: 94ms = 9ms + 85ms
memory: 22300kb,30360kb

input:

encode
5 5 1000 898188916
3878446307109 2396812392805 7101232002678
3881061351875 572883397645 885364698700
3003131767797 3767454439383 1825722117276
2643936216100 5232352415318 5006988551046
929309205322 3315389050860 2530814119358
1384100499309 453690506315 2024419621034
3710839897486 181225812081...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
516 18014262099240288243 18167375882061087744 18140512355878962672 283163826705138160 9153495899387977472 1671270560432252 62768953126027201 133012945920
280 18302496944238362127 18230537172381861792 279231629425147896 4467638932979843134 1152780767110356995 2253724021952124 230...

result:

ok Accepted using 485 pigeon(s).

Test #46:

score: 12
Accepted
time: 95ms = 7ms + 88ms
memory: 20320kb,29132kb

input:

encode
5 5 1000 500454374
3312790545165 4557461412414 7180280654085
1922567612595 4597750034542 8761274881778
1575944042691 7747642172296 4842659453140
3197757136485 5464257420615 743307696075
1902328569801 5878792039013 4223197164876
3289342996616 3753252022410 8067764853368
1264408740396 807007851...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
470 13975796024698994690 11261159440646392 4541809868347768863 8944140330152756736 1729839670399074055 18446739808808861788 18030891460468704 133664604159
288 13975215551123748927 18446743940464902155 16143116614785056496 279223181061910653 17294879166482866177 16142589922685977...

result:

ok Accepted using 485 pigeon(s).

Test #47:

score: 12
Accepted
time: 101ms = 13ms + 88ms
memory: 20268kb,29112kb

input:

encode
5 5 1000 930865139
909024793026 5633250233978 1332163280805
3474760071737 2015997535219 2127496234497
2579761482170 1874432151955 4332144410332
3639396157914 5308015461843 7171592353847
2785493575599 1920767525047 2697360050233
3532892093207 1867251199260 1107121348016
2189508091185 434345299...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
242 333548122281218145 9550621872056436800 176089361550247 18445988159465717824 549812174747 457396809904384 9226186110164547071 136306516256
821 13976852723798654592 1116923494953680256 1090724189765631 18446638514149769719 16853347449497537 18307059919355918208 912663370522592...

result:

ok Accepted using 485 pigeon(s).

Test #48:

score: 12
Accepted
time: 100ms = 7ms + 93ms
memory: 20280kb,29220kb

input:

encode
5 5 1000 105331868
1221991789537 2784871244705 7549310962661
2007825932327 6143229357921 704857807653
226215068463 3412096137518 5362855844359
3267646524610 7655426147107 3903753025114
3824279079955 2959338746126 6281427644685
1035910540483 5387336353026 3491616008000
585764946760 13031552144...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
387 565202853248923710 9230127848696592384 4611687925408564161 17328760642260697552 243202042120637564 2303659379121061888 972803632980297665 136918466561
136 5116230241165393951 14989105459259967232 369293704877310003 18426548265068527615 6413128158996979709 5911150432784285714...

result:

ok Accepted using 485 pigeon(s).

Test #49:

score: 12
Accepted
time: 94ms = 10ms + 84ms
memory: 20348kb,29424kb

input:

encode
5 5 1000 712057975
1283979386558 2609422068442 5285193667955
756524240173 3368701023121 1369187775744
168245944855 6336603892336 7168943311456
3564637026654 3440693096145 4466745678963
3577984468520 3043241172299 1720380983588
4056958796356 6275759978846 8562610527000
3935114052347 5539740755...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
176 288352987837350175 18014397976503508736 3459151574386079806 9223376364036354051 16420401453078083647 16210723918265122843 16178054730369318925 103079215104
218 6067125519688663121 16303517942357098519 4611685995096235775 18179078980223726591 9514013095211565439 1842719036399...

result:

ok Accepted using 485 pigeon(s).

Test #50:

score: 12
Accepted
time: 88ms = 8ms + 80ms
memory: 20320kb,29200kb

input:

encode
5 5 1000 622225847
3497369552679 2767458853429 5246462616862
2215456413244 6637798977651 2480057975510
1145522644021 6633348800256 7785783111836
739572316904 3739623167821 4635647760209
2239007143165 4521276479650 5092531650674
2078929325187 1123870503901 821408880249
3014496347660 6431665589...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
861 486401404143800257 17726273753085636733 17434406125321952 549446576275226623 9502597346072854543 9511567228634398471 14989035123801055487 128848510688
479 4915904950128607186 14452339276681056256 664272148818532160 810812584793323840 51791331364316353 8073968969454715317 184...

result:

ok Accepted using 485 pigeon(s).

Test #51:

score: 12
Accepted
time: 95ms = 13ms + 82ms
memory: 20264kb,29068kb

input:

encode
5 5 1000 731098172
1677991285089 3707368468273 342406967541
2338031201397 446210047252 5713965210034
152118072003 5566436451294 5122703555139
3867380872582 1462447917661 2994773719172
4333383201887 7379835531150 2597887481777
641313233377 2883824405889 2499326469948
3228625904946 633428176499...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
372 18446744004990074448 306451963905093618 16141605293103006365 18441699514432487414 1165869348160526978 6062971003716206608 9220735600439595008 38661136445
467 13835120594312386560 14987665405043124223 18170966765197336733 18212741473265164817 18446335124383629312 485468911172...

result:

ok Accepted using 485 pigeon(s).

Test #52:

score: 12
Accepted
time: 86ms = 8ms + 78ms
memory: 20356kb,30420kb

input:

encode
5 5 1000 175009391
1018901702544 3575263163726 1556803598696
1018901702544 3575263163726 1556803598697
1018901702544 3575263163726 1556803598698
1018901702544 3575263163726 1556803598699
1018901702544 3575263163726 1556803598700
1018901702544 3575263163726 1556803598701
1018901702544 35752631...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
595 531429019891011459 17329270839820021763 8943603210148905168 132474504081408 17294701113122945056 18014460090186317837 16143012179402031096 33789329408
90 1017831503016494479 18392813999172412430 504370230418522112 9231288620432523264 881581757334562680 7494135937681606760 31...

result:

ok Accepted using 485 pigeon(s).

Test #53:

score: 12
Accepted
time: 89ms = 10ms + 79ms
memory: 20024kb,31444kb

input:

encode
5 5 1000 26325440
3424931987370 8043695849576 2037732278383
3424931987370 8043695849576 2037732278384
3424931987370 8043695849576 2037732278385
3424931987370 8043695849576 2037732278386
3424931987370 8043695849576 2037732278387
3424931987370 8043695849576 2037732278388
3424931987370 804369584...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
900 18158513697465583615 13043259960967364612 13258078701781537175 10702822412916901078 1152941295775264007 35465557159493632 897270476319137 2252800
737 18158513696516731007 567178742519283727 9507236219042527168 1130405156249144832 8647047761171955727 559008770768764976 670706...

result:

ok Accepted using 485 pigeon(s).

Test #54:

score: 12
Accepted
time: 76ms = 4ms + 72ms
memory: 20308kb,29416kb

input:

encode
5 5 1000 907208564
3762363875476 2024970990243 3520251812416
3762363875476 2024970990243 3520251812417
3762363875476 2024970990243 3520251812418
3762363875476 2024970990243 3520251812419
3762363875476 2024970990243 3520251812420
3762363875476 2024970990243 3520251812421
3762363875476 20249709...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
143 17906295058816009200 8935273668737498143 4367260120480799 567179808207798352 108111680763886620 2233802466459124472 2376212019882704900 134283264
734 4287424371355711485 2600872769029668748 488183154745855 17439476978968430596 18226085904780990 15132096377411602475 133690059...

result:

ok Accepted using 485 pigeon(s).

Test #55:

score: 12
Accepted
time: 83ms = 12ms + 71ms
memory: 21568kb,31304kb

input:

encode
5 5 1000 276723199
2890978670427 5304738912554 5296974444905
2890978670427 5304738912554 5296974444906
2890978670427 5304738912554 5296974444907
2890978670427 5304738912554 5296974444908
2890978670427 5304738912554 5296974444909
2890978670427 5304738912554 5296974444910
2890978670427 53047389...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
236 18441115124478525696 2175520081306927168 788129934685269503 18044234780918235136 6773413070766087935 18446702842309526038 18433761040408952831 90872944896
409 18438941940826316801 9678728174526546432 468374361163726335 16553824840845918209 4179340048325440383 184467396845229...

result:

ok Accepted using 485 pigeon(s).

Test #56:

score: 12
Accepted
time: 81ms = 12ms + 69ms
memory: 20304kb,30420kb

input:

encode
5 5 1000 717493508
544191931388 7395963008496 606133336307
544191931388 7395963008496 606133336308
544191931388 7395963008496 606133336309
544191931388 7395963008496 606133336310
544191931388 7395963008496 606133336311
544191931388 7395963008496 606133336312
544191931388 7395963008496 6061333...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
152 432397791298576639 18167375898196051905 18438299343306819521 18446744073188933855 567729531004252239 18445652791253796801 18442240440771026812 13016958200
447 468389756288622847 18167375898196051905 18439986543899641793 18446744073189130271 567728432566366303 181574223979389...

result:

ok Accepted using 485 pigeon(s).

Test #57:

score: 12
Accepted
time: 77ms = 8ms + 69ms
memory: 20668kb,29196kb

input:

encode
5 5 1000 79034960
1066466211968 6080920718470 2307407471363
1066466211968 6080920718470 2307407471364
1066466211968 6080920718470 2307407471365
1066466211968 6080920718470 2307407471366
1066466211968 6080920718470 2307407471367
1066466211968 6080920718470 2307407471368
1066466211968 608092071...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
5 5 10000 485
413 538180980335185600 1071865233049911264 18149515152666263676 2288373974914302200 559009301665415296 545907506927616 17294878233541540608 13632384
575 2751774320045213896 9806372684411437051 585389074199740428 18445073949906801936 310748372531152896 2305941965257342988 7665971...

result:

ok Accepted using 485 pigeon(s).

Subtask #7:

score: 12
Accepted

Test #58:

score: 12
Accepted
time: 110ms = 12ms + 98ms
memory: 28276kb,35364kb

input:

encode
6 7 1000 618359561
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
694 4611826756185227280 2251937252642848 1125934267629568 72620544125567232 72092778426794242 4503616807501824 72339206453854208 1154047405587435520 81064947913662456 335672831
249 72058693570527296 1374393729024 72058693566333184 72058693570527296 18014398526259456 720586935663...

result:

ok Accepted using 605 pigeon(s).

Test #59:

score: 12
Accepted
time: 99ms = 16ms + 83ms
memory: 26280kb,35092kb

input:

encode
6 7 1000 963145103
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 87960930...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
695 12810702435844096 3747003686803472422 16717361491512360959 11529215058850676736 878201352080328744 144406164450181252 364863040225546239 18290455142551517066 22676252901375 437256192
974 10581821309976576 2308132811434885153 9223371428063936510 14987979634739773440 508906698...

result:

ok Accepted using 605 pigeon(s).

Test #60:

score: 12
Accepted
time: 108ms = 11ms + 97ms
memory: 26332kb,35096kb

input:

encode
6 7 1000 379899771
4129154388645 7176964400535 681528072488
4129154388645 7176964367767 681528072488
4326044618039 7899397033929 2799696336628
4326044618039 7899397033929 2799696320244
3600506131201 7310829483401 42098213051
3600506131201 7310829483403 42098213051
2857486474248 4960267306436 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
866 141793021531267007 9223917257183199455 13853212637262766143 9223508376548148192 4584664884520153119 18375246131148882166 1968125946626054 1548119888133624 8954423225090552 63503
243 17874760533031191039 18410994552706891779 17865814905345539587 17888158081672535040 862439459...

result:

ok Accepted using 605 pigeon(s).

Test #61:

score: 12
Accepted
time: 105ms = 7ms + 98ms
memory: 27612kb,37008kb

input:

encode
6 7 1000 522524894
2322447211607 5399107409573 7363157453891
2322447211671 5399107409573 7363157453891
3078056273631 7232754012656 8791138899322
3078056273631 7232754012657 4393092388218
3848510722931 592391727717 5436709718104
3848510722931 592391726693 5436709718104
1952449397777 2758003613...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
606 9294936504222580990 571992337048133695 13799309642267885568 571957187035791412 4467865524371468 4575938679338694671 17874768229371461759 18444509730773794561 18158518095670411312 114815
669 117023771256682464 33776997205803034 985167778873343 18445626909699604479 18439988672...

result:

ok Accepted using 605 pigeon(s).

Test #62:

score: 12
Accepted
time: 107ms = 19ms + 88ms
memory: 26632kb,35160kb

input:

encode
6 7 1000 48272751
2062414128330 7495157981650 4641994530339
3534201123281 2526341319313 501726249120
1903046134961 6352616488247 8376657310653
39004661029 1212410409551 8692706041506
1037182881908 684700520785 2248228120600
120911301601 8258926923892 6459381357183
1603549253305 2984245164153 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
732 18140510865663721600 15446906505232303 18441224525342783487 16766901417146370304 10151298548628817 1153027607478952448 1152922803834368100 294422898502795033 140739635982335 535398400
145 16827880602454720511 18446718097747345409 2400981826449301634 15015036342026597887 1578...

result:

ok Accepted using 605 pigeon(s).

Test #63:

score: 12
Accepted
time: 106ms = 15ms + 91ms
memory: 26592kb,36248kb

input:

encode
6 7 1000 249678103
4103185220504 4250478558214 2763498567302
3280792168879 4710470704443 8203941123310
4306095510703 7134716015185 7427349368959
1887698562197 4620506264378 3836638614196
2234320794615 2027609146142 1659740199251
3011180842709 485981056681 7597045465464
3616635120379 627095109...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
758 137342333621358560 4610568863074844673 13799310460499001408 27039053585039871 17942271094173995008 1152951191466934336 70650227610094592 1008810693102895104 17293846758487490560 983040
593 2287969075451658335 13870528281066897408 17874760530673584 17943482173652993 178342567...

result:

ok Accepted using 605 pigeon(s).

Test #64:

score: 12
Accepted
time: 105ms = 11ms + 94ms
memory: 27676kb,37120kb

input:

encode
6 7 1000 1000690120
1307949810595 2976967260492 6673392767864
3252745431186 5893544760884 8012798774669
3394927031820 6800140094294 8236984502335
4119865901883 2588450658670 8656412787796
801131260317 5962203649480 6685205008630
3215071792117 8163302212045 3355572768107
984910658015 252970422...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
426 107804928931530625 18160764951877384207 18303749837763314048 18302628894157044743 17852269464062771200 15852687249205362433 18230575586296723471 16140931850888548295 17302827586379845120 0
372 18122464295437485467 18412017108700364791 9232382105151937042 293314797360726848 5...

result:

ok Accepted using 605 pigeon(s).

Test #65:

score: 12
Accepted
time: 103ms = 12ms + 91ms
memory: 28332kb,36036kb

input:

encode
6 7 1000 525626337
4368177976263 4297245566448 1488160185846
821700421701 3600321199561 2384695383366
775053646473 8392810541945 6684683995193
3312571886853 5952439973623 3098902549890
334950800011 8035269183885 4394146201843
3582869874866 1347914161951 6995697314888
1655610574528 54658967448...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
865 14001729578372956158 16429133014216202816 11957051375690835967 18430042784680843237 4400193994957 18446227321330335688 13844067949906755592 562955867521024 576791008246250514 271244926
176 14484736886973317376 6619405248077234176 11558668763620704256 3729543420216128 7177611...

result:

ok Accepted using 605 pigeon(s).

Test #66:

score: 12
Accepted
time: 104ms = 7ms + 97ms
memory: 28440kb,35116kb

input:

encode
6 7 1000 671642030
2725185712531 8287031153418 2168001911516
42180464211 8415647569490 7011443191176
1456741816579 6573676380351 5894036118213
1878311534883 5357783419471 4042768830739
3330548673030 8475609299195 6478334521337
111829624275 2664958288490 783177279095
1629993756818 749185387300...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
349 18446734867717718063 18443225642729209766 5764617143759685632 5476377362377523401 6917536724222433288 6876794882678407168 82999936207027869 3091826696980992 1196543529167039 531533954
135 18436057164893222911 18367932747517043711 17803859080305745887 18446744063274287280 164...

result:

ok Accepted using 605 pigeon(s).

Test #67:

score: 12
Accepted
time: 94ms = 7ms + 87ms
memory: 27340kb,35940kb

input:

encode
6 7 1000 714310700
3399285342196 2131813727775 3574919175759
693021286815 1602089810507 7516515999839
3960118063172 726977278309 1798928144745
3767941837204 7298695589988 8621339884667
2875300645854 4878081346468 7596442354273
2978865913521 947246253599 5763842742283
3411892386923 82077816703...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
337 139576405687017408 6935471957961078799 18446674252506599296 31525333764153280 4575938695852440576 1008808240692822017 16122992492638385152 873628508654923903 143975541509226241 532709120
752 10396647703065013015 17959651626511089922 1706991802282879 16993217156161224704 9124...

result:

ok Accepted using 605 pigeon(s).

Test #68:

score: 12
Accepted
time: 102ms = 11ms + 91ms
memory: 26264kb,37128kb

input:

encode
6 7 1000 461300612
725425529391 4652484046177 6556279836547
4365645457046 1395283792020 713846736954
4314584863798 7519042796100 6421081411030
558963142230 5821645669542 6621773351165
4073558392493 52776970461 2991744437775
3072399285427 8304777644491 5738093007523
3421756419281 287114582459 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
849 18428869313209827343 16158914372033315828 1970341412867968 66991077608921072 14636731001330688 288239172378955520 9151877384246935424 18410994552910397438 285978640695429632 128
722 1513227582378606243 4865559404991228206 18442702406439550591 18027088076222373888 33419244685...

result:

ok Accepted using 605 pigeon(s).

Test #69:

score: 12
Accepted
time: 104ms = 7ms + 97ms
memory: 26372kb,35096kb

input:

encode
6 7 1000 336835934
2757207542626 2257222291912 8218773069248
2083963673170 7830719682208 6769908871065
451718913121 7217074850493 4298702984378
951152278488 8553867212999 4343294711377
2312304358705 3301336951864 406364525144
1374586517735 7784561000690 7546597166448
2056467527536 25833544533...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
841 18430986432815300648 17965040040396724745 9288753457626349640 2741192502338913647 18425494916353228944 4617915044641513480 1117103813814884 6755399709508640 4541396482785280 0
414 108087477683814401 4611958629120146944 144118761502801928 7863708170567807 9295145974006020080 ...

result:

ok Accepted using 605 pigeon(s).

Test #70:

score: 12
Accepted
time: 88ms = 8ms + 80ms
memory: 28600kb,35104kb

input:

encode
6 7 1000 192911013
4382373901410 8565950446177 2071323137310
4382373901410 8565950446177 2071323137311
4382373901410 8565950446177 2071323137312
4382373901410 8565950446177 2071323137313
4382373901410 8565950446177 2071323137314
4382373901410 8565950446177 2071323137315
4382373901410 85659504...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
309 3000226587885687 18217650777449566274 1182274071673590848 18017715331530768 1159761678133034993 1729383390900231657 108090857826058239 18444018384388714491 13835050651039563776 75235327
403 2730638738510151 17843827798721495044 11536012227292767232 298365675552899074 5192810...

result:

ok Accepted using 605 pigeon(s).

Test #71:

score: 12
Accepted
time: 99ms = 12ms + 87ms
memory: 26324kb,35108kb

input:

encode
6 7 1000 398598519
1514867349999 3377920774229 3625034198291
1514867349999 3377920774229 3625034198292
1514867349999 3377920774229 3625034198293
1514867349999 3377920774229 3625034198294
1514867349999 3377920774229 3625034198295
1514867349999 3377920774229 3625034198296
1514867349999 33779207...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
839 11719070403208169747 9280229992890122240 1689953666859095 13835056839832248385 9224390184102043648 3458764523719491584 64932758297779431 18446393352051054664 9381006820507123711 528671305
940 1630415782498314480 1767663000443158532 1689141918041665 18446743837520597040 14565...

result:

ok Accepted using 605 pigeon(s).

Test #72:

score: 12
Accepted
time: 98ms = 8ms + 90ms
memory: 27648kb,35100kb

input:

encode
6 7 1000 906922901
1296024528502 768615439834 3922131708537
1296024528502 768615439834 3922131708538
1296024528502 768615439834 3922131708539
1296024528502 768615439834 3922131708540
1296024528502 768615439834 3922131708541
1296024528502 768615439834 3922131708542
1296024528502 768615439834 3...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
474 139541223927972093 13835058059543773181 18446744073708511196 3940658197234173 1099511962800127 13870805380545695712 4611546371993903096 1148382995485229564 285996168389849086 8354823
612 11241050426006198976 2017612634231635903 18446744073709536264 14134547430632320160 31809...

result:

ok Accepted using 605 pigeon(s).

Test #73:

score: 12
Accepted
time: 76ms = 8ms + 68ms
memory: 27324kb,35068kb

input:

encode
6 7 1000 919904950
1015772028675 7405788239716 1679014321718
1015772028675 7405788239716 1679014321719
1015772028675 7405788239716 1679014321720
1015772028675 7405788239716 1679014321721
1015772028675 7405788239716 1679014321722
1015772028675 7405788239716 1679014321723
1015772028675 74057882...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
726 3748031151495708429 14018537602225733631 17868875941456453470 618039656386355199 18446118599786498943 18419828407009544192 1152921504606851343 18446410945329627137 4612540751272804791 260358144
338 135038032386456583 17865797450862723071 13834846880864894977 1830150741787299...

result:

ok Accepted using 605 pigeon(s).

Test #74:

score: 12
Accepted
time: 90ms = 3ms + 87ms
memory: 28296kb,35396kb

input:

encode
6 7 1000 307505929
1974606868459 1835892878920 2891622509426
1974606868459 1835892878920 2891622509427
1974606868459 1835892878920 2891622509428
1974606868459 1835892878920 2891622509429
1974606868459 1835892878920 2891622509430
1974606868459 1835892878920 2891622509431
1974606868459 18358928...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
300 143534646997549247 9294871059658539008 8070476921042895088 8760635919691807 15996794536139489216 9151314511003643935 15564462302559211328 1099544133639 17302825404435531775 470282240
55 143543442555797567 9294871053216481280 523367769703414 2005236478636063 15852688144156655...

result:

ok Accepted using 605 pigeon(s).

Test #75:

score: 12
Accepted
time: 99ms = 8ms + 91ms
memory: 26340kb,35104kb

input:

encode
6 7 1000 139288815
2085773865084 5763106081944 5138784248741
2085773865084 5763106081944 5138784248742
2085773865084 5763106081944 5138784248743
2085773865084 5763106081944 5138784248744
2085773865084 5763106081944 5138784248745
2085773865084 5763106081944 5138784248746
2085773865084 57631060...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
6 7 10000 605
474 9295077787171848193 18154010364285030384 2288107903837519999 4295098370 9223653519750339328 234187180639912958 286118222904168416 4503805785800759 17301712621594468352 67110272
448 15951829044983548932 13944210766460092411 8358757530616200392 268705792 2306441246828136456 31...

result:

ok Accepted using 605 pigeon(s).

Subtask #8:

score: 12
Accepted

Test #76:

score: 12
Accepted
time: 117ms = 14ms + 103ms

input:

encode
7 10 1000 211479294
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
187 9223372586610622464 2305860601399803920 68753031168 140737524006912 288230376161148928 288230925907542016 576460754450907136 2305843576149377024 576495953855381520 2251808403619968 562949953423360 40532448068501503 31
149 9007201939095552 2251800350556320 140737521909760 17...

result:

ok Accepted using 773 pigeon(s).

Test #77:

score: 12
Accepted
time: 115ms = 14ms + 101ms

input:

encode
7 10 1000 717484047
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 8796093...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
220 8866461900537792 864972328570699791 18442244869444338032 140737554382848 575880210172084224 2287828627867287552 285979674776960768 4609152743905099776 1008806366996857851 16140901064562901055 18374756779696349120 1081919450116064 0
33 749273962513900 16093099796482683631 18...

result:

ok Accepted using 773 pigeon(s).

Test #78:

score: 12
Accepted
time: 128ms = 15ms + 113ms

input:

encode
7 10 1000 827784394
514735864053 3549782390950 5376884663210
514735864053 3549782390950 978838152106
3308246509869 6149758902427 416789217834
3308246509869 6149758902427 416789283370
4375034511123 2440063209409 2384754529222
4375034511123 2440063209409 2384754528966
3161033729510 699365202109...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
865 18428870344036024192 1829450043883519 9232374820883152704 1090646815342332 65966406889475 18410574539311284227 13835062436014588023 17293823359376719839 17293823084498810878 36028779855863296 8936830526291968 12682137614753464320 15
902 9042349300629519 18302065935948447744...

result:

ok Accepted using 773 pigeon(s).

Test #79:

score: 12
Accepted
time: 132ms = 15ms + 117ms

input:

encode
7 10 1000 276584934
4081922575829 7559385287274 5945501906848
4219361529301 7559385287274 5945501906848
4189638566395 3297304534628 584777042114
4189639090683 3297304534628 584777042114
428090427728 2456346958677 7884734456565
428090427728 2456363735893 7884734456565
2313158316651 72474318821...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
16 18158794898192990719 18445619272643248251 18374739273400713216 2303593408423002111 14123288362848616320 9223301736762966039 16140903259215757319 17257793789263617023 16491601199615 12682137306589593607 18302769623088529391 17870283836802217728 7
554 15199649277214656 1152919...

result:

ok Accepted using 773 pigeon(s).

Test #80:

score: 12
Accepted
time: 117ms = 7ms + 110ms

input:

encode
7 10 1000 670206878
2977326359105 5804770168216 8757960133411
3247832747454 355514014765 8626273435563
96077062687 4706768007092 7084289919811
506841959952 1900949252398 6665556423309
1679099807551 147138997685 6824222445444
2952224667142 6670625680632 3836919411172
2346703799568 519814711191...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
507 6753147588500848672 9223378013570203643 1945702075618819501 9223373179316076544 288403024779487380 9223939522293694465 2295709906635981056 308376504369151 16924598023751716368 4980975075297 13961183436220661740 12740794422319382528 0
16 9232374700624117760 56520175537402675...

result:

ok Accepted using 773 pigeon(s).

Test #81:

score: 12
Accepted
time: 134ms = 23ms + 111ms

input:

encode
7 10 1000 642392893
3741748491399 4561401992404 5452373285989
4166828925798 4646257241036 7175150600376
4081126671930 4553965739124 8681728445507
45931383332 3608345852268 988075061632
1642036883715 2436119157687 5849740210055
4322966802055 5192108208310 7382472725671
1960394699147 7021903100...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
935 18446744065390255659 9957531320798150653 16681473770187128833 2226135370815 12653153155601028376 3910540939592990866 4636460214491545672 16140901064477186048 6600588203864881041 7133701815001776127 8812453794899034111 18364202649943080994 16
133 8725724543844352 57646075230...

result:

ok Accepted using 773 pigeon(s).

Test #82:

score: 12
Accepted
time: 128ms = 16ms + 112ms

input:

encode
7 10 1000 997705422
3152624187216 2775131366267 3322508449560
666594228475 8742959935889 39725113875
1150730957879 8526393020879 330876702426
356960004654 1544811367411 2809568944245
2460025749425 2831542347817 5452958102200
2398002089812 26321691163 2161600083328
2616351921434 8007227680302 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
89 18446462873472335873 18374686547317359087 18158794074095616000 8935141729422556672 8987408047308768 576460748012646400 6144 17979282789826544 288087439641673216 8998394580107327 17293822839685645824 4433230949777408 0
227 1191202120236793872 10438516038618317638 110176837304...

result:

ok Accepted using 773 pigeon(s).

Test #83:

score: 12
Accepted
time: 121ms = 19ms + 102ms

input:

encode
7 10 1000 371958993
764189210063 3970504211432 3353833419233
3828835392294 8413013967796 6677447414970
2191699906106 4876446911513 5876243643433
244987735687 6018919015467 2432770870918
3402261940969 2713137256561 5668542941386
2645455216631 6214524479810 3261597519661
1389118481564 131956173...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
49 11259001214795776 1150660908704202752 274878162944 16106127360 9214373629402279936 35958428289466368 16140903262378262528 527731250958332 140600183586847 18086456103519926272 22518002163515264 2305842459994480647 31
102 9214373632620363200 562400734216447 1613864926675835289...

result:

ok Accepted using 773 pigeon(s).

Test #84:

score: 12
Accepted
time: 135ms = 24ms + 111ms

input:

encode
7 10 1000 110149027
3567116936952 1432238051665 8666227966386
369441606169 1711163063339 2469835063742
4242523121467 8673545879712 3665112940954
2040848013742 6631244203986 977581764890
2129973352940 295637567886 3184666259494
2651559472586 7521341866419 4719496136038
3005276363714 6998739617...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
540 17870845721603858432 143763344421289984 2287828627481428087 18302769485817184256 540431989241544812 53325777600508 72022134788193536 2181431134511104 90072009593061631 13839561654909526023 18338657716509048863 18158794897656773120 15
887 18428747267386113024 184287297438525...

result:

ok Accepted using 773 pigeon(s).

Test #85:

score: 12
Accepted
time: 123ms = 19ms + 104ms

input:

encode
7 10 1000 595503445
2331995655030 4228638622205 5530282314490
621967825175 8129419996365 5893446861429
1845962905658 3388953795189 2106007228577
3732788120452 2230049726225 2926463586884
3987170665027 5511374216323 2652570347959
1490519353267 8065470377688 2208024085401
34171147625 5409475154...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
279 15760401820024704 2304646740629524476 72053200282198008 144115170912747527 18302769620976662528 13493206712811520 216172807749369983 9223375334316442111 13830558853697114109 9223380575232999420 71987227439138815 18428747258259308800 0
984 1151796704211108351 115292169699456...

result:

ok Accepted using 773 pigeon(s).

Test #86:

score: 12
Accepted
time: 134ms = 15ms + 119ms

input:

encode
7 10 1000 484021511
433825512805 7720939337023 4380178108816
2113401314606 1115254791303 4849455714646
338626768154 8750821914343 3047839466077
2549772699946 6942697255753 5495051107509
3332131896595 839285649778 7047679864061
992452871192 1733670525623 38304580091
3160101408443 935580371813 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
224 17433856386260992 143974450654543935 18446742975270617088 8934860443441160064 2181431094673411 8935141763782311919 18158795171461856256 4160618623 18001200079175679 9223367638808256519 18320625709132812284 2303593407350569984 15
581 4607186816842338301 8727373606975 1729494...

result:

ok Accepted using 773 pigeon(s).

Test #87:

score: 12
Accepted
time: 129ms = 20ms + 109ms

input:

encode
7 10 1000 13188011
1083493333359 7294475794357 552853580751
1027648479364 6559601145193 3058356478960
141992131873 5000732177882 4136587752882
950687741778 3715291654497 263875446672
859551589885 3660885812003 5969321744088
67331949319 5983976657854 1108064311820
1857737525525 8468380354884 4...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
480 17873661289300223 18442244869979111425 18410680126678224894 35993612663619584 286541526551494663 15852670962953355519 18374756796876206072 140187196162079 17870283390125658112 16642998528 1123700885667840 108086399646830304 0
801 140737623924736 12083125433428607498 9008261...

result:

ok Accepted using 773 pigeon(s).

Test #88:

score: 12
Accepted
time: 102ms = 4ms + 98ms

input:

encode
7 10 1000 920445191
1696220569565 4209752963503 2017730115005
1696220569565 4209752963503 2017730115006
1696220569565 4209752963503 2017730115007
1696220569565 4209752963503 2017730115008
1696220569565 4209752963503 2017730115009
1696220569565 4209752963503 2017730115010
1696220569565 4209752...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
871 17941830742048768 6917530711234740216 144044750612266912 540959725058046 34016141017024 1020346823080960 17169973705179143 18302488285583246335 8646911825700454408 17592194465760 576460743721873152 4362862201929728 0
898 17873661086138368 6917530711234740216 144044750612266...

result:

ok Accepted using 773 pigeon(s).

Test #89:

score: 12
Accepted
time: 115ms = 10ms + 105ms

input:

encode
7 10 1000 437613373
3065774291798 241316231006 673065926360
3065774291798 241316231006 673065926361
3065774291798 241316231006 673065926362
3065774291798 241316231006 673065926363
3065774291798 241316231006 673065926364
3065774291798 241316231006 673065926365
3065774291798 241316231006 673065...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
925 18446587411287769354 5151757918023204607 18368927243589828896 2709553992525971461 14195346022430985986 9774007475226214399 18446176795642478849 3603174456914117248 18014402842330368 940970847125635600 5260345102291984159 18446744070829817856 0
766 18442244869712773247 16140...

result:

ok Accepted using 773 pigeon(s).

Test #90:

score: 12
Accepted
time: 116ms = 16ms + 100ms

input:

encode
7 10 1000 388784557
2027131083733 3922417372204 52801510673
2027131083733 3922417372204 52801510674
2027131083733 3922417372204 52801510675
2027131083733 3922417372204 52801510676
2027131083733 3922417372204 52801510677
2027131083733 3922417372204 52801510678
2027131083733 3922417372204 52801...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
323 17979214154038272 17988001648868352 18433233276958146575 16138649266561220703 9223380755638390815 17870846271359483967 17293823116442599552 143974588025406463 8070451082003742720 9214373633693057023 17870845790256168959 17996806323437568 0
179 17996256568016640 447720276675...

result:

ok Accepted using 773 pigeon(s).

Test #91:

score: 12
Accepted
time: 124ms = 12ms + 112ms

input:

encode
7 10 1000 611892990
742599828939 4061868789485 7590353819583
742599828939 4061868789485 7590353819584
742599828939 4061868789485 7590353819585
742599828939 4061868789485 7590353819586
742599828939 4061868789485 7590353819587
742599828939 4061868789485 7590353819588
742599828939 4061868789485 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
657 2319367277653397539 18016059057766407 38280599114350592 3948499637215698944 19800967460525840 9978850209985201393 2630700277367308288 35166779898085376 598151778451506 4064499935029497354 1421479969552402464 5191946845839949823 31
569 583229346715537456 9799833614887718952 ...

result:

ok Accepted using 773 pigeon(s).

Test #92:

score: 12
Accepted
time: 129ms = 8ms + 121ms

input:

encode
7 10 1000 290705354
3884008138914 6914632849679 113728531618
3884008138914 6914632849679 113728531619
3884008138914 6914632849679 113728531620
3884008138914 6914632849679 113728531621
3884008138914 6914632849679 113728531622
3884008138914 6914632849679 113728531623
3884008138914 6914632849679...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
246 4853754498398287104 14118966251225088 10394539852224823296 1369669640539603026 8642757201175396356 10395522058005250048 350892402409480 4323455644794061504 67757404061694 15854218843056504831 10574451925070567423 18150632398748909568 0
579 714946440845038098 315297191331629...

result:

ok Accepted using 773 pigeon(s).

Test #93:

score: 12
Accepted
time: 109ms = 4ms + 105ms

input:

encode
7 10 1000 771223351
96044864649 6803600523962 5694840158980
96044864649 6803600523962 5694840158981
96044864649 6803600523962 5694840158982
96044864649 6803600523962 5694840158983
96044864649 6803600523962 5694840158984
96044864649 6803600523962 5694840158985
96044864649 6803600523962 5694840...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
7 10 10000 773
956 13229324073173007 18158513834996842480 288195226114195456 1098438934400 2304716010332618240 2249600792403960 144114089637429248 288019269919179775 18012201631612928 11526965445273849853 9223380695525605391 18437745664105382400 15
544 12947849331343407 17870283768082743280 2...

result:

ok Accepted using 773 pigeon(s).

Subtask #9:

score: 12
Accepted

Test #94:

score: 12
Accepted
time: 148ms = 8ms + 140ms

input:

encode
8 14 1000 963380543
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
888 562949953945600 9007199263129600 180143985094819840 2305843011898048512 42949672968 512 10995116279808 35184372088832 2814749767106560 45035996282093568 144115188075855872 9223372045444710410 34359738400 2079 18410717475709649151 8257536
977 703687441776640 1125899906842624...

result:

ok Accepted using 983 pigeon(s).

Test #95:

score: 12
Accepted
time: 138ms = 8ms + 130ms

input:

encode
8 14 1000 605060241
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 8796093...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
281 1048576 31490013019619326 134217662467 18446744072635875324 2305702280315011087 18433232999966310368 36027697440231168 288212792555077663 18446744004994269055 18158513698556084224 216172782247993344 562931699810306 18445618225343365084 0 1099444523007 8388607
721 2814749767...

result:

ok Accepted using 983 pigeon(s).

Test #96:

score: 12
Accepted
time: 164ms = 27ms + 137ms

input:

encode
8 14 1000 661983807
3231798265249 6985324481100 5168906965630
3231798265249 6985324481100 5164611998334
672410575384 1497162578575 4201442002018
672410575384 1497162578575 4201173566562
2478903083444 7918596206278 2156610798716
2478903083444 7918596206278 2156677907580
2611943318172 123039075...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
322 18445653358174793728 4611545272349622271 18302637681198235136 576451956747239424 144106392519704574 2251696734470267 16140901066643341317 18437736874488363008 72053196259852256 36027147751524351 9079256848913137664 8795556184063 18445618242520023040 4221849772753915 5153960...

result:

ok Accepted using 983 pigeon(s).

Test #97:

score: 12
Accepted
time: 154ms = 15ms + 139ms

input:

encode
8 14 1000 949265882
1704514330496 6188091860716 5993934986878
1704514330496 6188091860716 5993800769150
1406502191565 6956544326642 5309725515728
1269063238093 6956544326642 5309725515728
333738894301 6422675463224 7634157575236
333738894317 6422675463224 7634157575236
1852204496066 574238342...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
396 18302637681324064768 8502796096869761024 931135488 558446354062360576 18446744073705357567 18160765359940960192 72053195991421951 17293892937712672767 13546827679398871040 18446735278153379840 275977418575776 2198889037824 3459890345012101119 18302637681189847040 8589934623...

result:

ok Accepted using 983 pigeon(s).

Test #98:

score: 12
Accepted
time: 154ms = 20ms + 134ms

input:

encode
8 14 1000 517195582
1941386072680 8023570462603 6774413666179
1327706040641 4397366997098 1434522901863
745795240902 3234503965265 3234297772153
2560534692929 544591456433 6959630982862
199046287909 98778942434 5067171006442
3169451284295 786706196864 6835820037314
409014825003 2168150013925 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
558 774056186216064 8246270099456 4521614025942761472 9006615139188852 273804165121 17293541094127038208 13176959664174 137430564864 216172799292604479 18446744039351910272 3848290698231 9223372069872336896 18158496106445537272 9006718214209791 18302637681391173632 2031616
922 ...

result:

ok Accepted using 983 pigeon(s).

Test #99:

score: 12
Accepted
time: 146ms = 15ms + 131ms

input:

encode
8 14 1000 918921663
1135464064092 4168339712923 2081870853388
806509234642 5994768749097 1733235608220
2618227946777 5242441735407 5041359575998
145018738024 8351768679756 6044894767406
4301111154115 5332113744701 1870541350212
349668824714 6909365690292 2056269417873
2631699605483 4694593658...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
892 1118203258343423 18446744072635875324 137170501632 18446726482597199872 562915593683071 13837309717665284095 18158531288804352000 9223354445742432256 556352883662839 18437737218052194303 18446744069414846455 68685918208 272678346850302 2251662374731903 18302637673137307616 ...

result:

ok Accepted using 983 pigeon(s).

Test #100:

score: 12
Accepted
time: 153ms = 15ms + 138ms

input:

encode
8 14 1000 310160528
3526330351681 4968772129784 6924688973717
1520091681659 3893581752601 240713530078
3841558379621 7172835952888 135029017314
1023822415062 6928742746258 2470080114396
1329188393798 218058894669 3429975780960
3062812158703 7670010192764 2632691831185
1061764581073 3267367682...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
16 1153203039781259264 562949953568768 18014398681603711 18446741858903654431 9295887027757315807 18446744073709419652 3026619397310513143 4339517327402235912 14988542509859218060 2342997706145859452 17015938597368365067 6953577615869345792 354088064638771059 103762938163396280...

result:

ok Accepted using 983 pigeon(s).

Test #101:

score: 12
Accepted
time: 164ms = 32ms + 132ms

input:

encode
8 14 1000 325990870
1772779597806 582454201044 3645926295915
1370340779531 26245764877 7004146250249
1823151671338 8365485967803 5254740579456
2599219510059 8612846665236 7475963017104
2069101495776 3546114793208 681572407314
3684498739753 1016407215487 3011633868095
2236002810478 18624758573...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
883 18446744073391934976 1169921534920228412 1450159080013432096 144748575492932632 18134869799514136224 17870283321406652816 1205485678102195 4035526532428226535 18446391292612067841 1152982265377130496 10088235927333544002 217146004809973760 75666122480812029 1492805775225834...

result:

ok Accepted using 983 pigeon(s).

Test #102:

score: 12
Accepted
time: 160ms = 20ms + 140ms

input:

encode
8 14 1000 128876684
2914127130681 4935124425122 4004906973192
2273224442809 5425551323008 8358547827953
177877099226 5509247387825 3819987747383
2240117442888 607109272057 1899196010997
2808575402664 4074938625940 4021249994955
2018133509222 6334179077957 8642025962096
3090118103449 322601939...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
78 17781251879175454721 1381892599048470529 577666233667766656 3179585729706590208 358078386012159 18446624298614433278 1740430244808360320 720576258286975996 7993931162446870320 10334656125730816 17622924526785 11628407487568281602 9454097446056034557 6601294159049392281 13384...

result:

ok Accepted using 983 pigeon(s).

Test #103:

score: 12
Accepted
time: 158ms = 26ms + 132ms

input:

encode
8 14 1000 620488000
367977389913 398629451486 3584468374450
702741503478 6966562037837 1668265174076
676781470085 444598195458 7588511843184
1699410726787 5845811284029 921603585810
2159706224958 6305411379319 1874343106850
635929733204 8604906130647 8259284023930
2874776556246 3815046783613 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
884 2812902587571558758 9223372036927225856 1154535589289132032 38875821835904 3114379939944899550 3458764416848789504 576460752305520770 145251550528405504 283058750480520 6962776207518097495 10754680935849916159 18446744073707191393 1 756746024642412544 4801259436716851200 10...

result:

ok Accepted using 983 pigeon(s).

Test #104:

score: 12
Accepted
time: 151ms = 27ms + 124ms

input:

encode
8 14 1000 414893142
2842742983238 5158709369145 8190192127641
2678261685551 4598634923318 5555443661595
2501192986185 3417260517359 6074484433366
3815895818317 577472143140 3080343259951
1831922776548 8292173568105 7010724854293
364370766994 3604969772963 3382104976604
777091534114 2252558732...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
637 16141041797152374785 18437734675431562624 4397509640193 18410713077797355775 18302620090010439679 15996785876956856319 68717363200 1125856957169690 51539607615 8070450536291236864 1152921500312141815 13835058062798356480 4611404560630284303 18437736324732026911 184287285757...

result:

ok Accepted using 983 pigeon(s).

Test #105:

score: 12
Accepted
time: 140ms = 20ms + 120ms

input:

encode
8 14 1000 394195535
809355407421 1465074462497 1082089120809
1863569178062 1863444016728 8780519618373
409262738266 8172528619999 1870960937893
2708395716207 7151111730031 6838810236495
983940113663 8325076927653 3259629472735
2805752287024 7003216675256 5454170265675
3659510829069 8210524017...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
662 5800748470237046 12105675798373036088 16845872744519172736 9509491628780359331 16140900497077968899 144115239619682831 16273352632818663744 620150190430486369 9392257041289314303 18434988347177828352 290482317978256480 6917810794689205342 15564440312192014472 92717857529858...

result:

ok Accepted using 983 pigeon(s).

Test #106:

score: 12
Accepted
time: 138ms = 16ms + 122ms

input:

encode
8 14 1000 676499574
3668858819109 5327606529726 6453855996597
3668858819109 5327606529726 6453855996598
3668858819109 5327606529726 6453855996599
3668858819109 5327606529726 6453855996600
3668858819109 5327606529726 6453855996601
3668858819109 5327606529726 6453855996602
3668858819109 5327606...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
304 18446181123756129977 243194658331539455 18408258486681993216 21965523609394298 15119712048012853248 4947936544808 1308375408500016384 2341871892200161280 70368777732160 2224778138670340224 536873257 892856220513182463 18445461809478934552 1083265566990863970 144245150525423...

result:

ok Accepted using 983 pigeon(s).

Test #107:

score: 12
Accepted
time: 155ms = 20ms + 135ms

input:

encode
8 14 1000 94018479
96888197272 8643078329578 1753361602650
96888197272 8643078329578 1753361602651
96888197272 8643078329578 1753361602652
96888197272 8643078329578 1753361602653
96888197272 8643078329578 1753361602654
96888197272 8643078329578 1753361602655
96888197272 8643078329578 17533616...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
360 9021089181073408 9414479149717 13792823614636041 432345564269510656 281474976731069 18446744073703460993 676500734947116800 12743217170914361356 5344506120293580212 10305257479113539242 9572401559879295285 9522364432819243067 10088063165309842147 2017618154231955455 1792089...

result:

ok Accepted using 983 pigeon(s).

Test #108:

score: 12
Accepted
time: 134ms = 15ms + 119ms

input:

encode
8 14 1000 900993988
2369874122913 7762085972315 658213084387
2369874122913 7762085972315 658213084388
2369874122913 7762085972315 658213084389
2369874122913 7762085972315 658213084390
2369874122913 7762085972315 658213084391
2369874122913 7762085972315 658213084392
2369874122913 7762085972315...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
897 1125814007496751 51538558976 71987225830588417 18445618242520088448 108088590012776448 15199648744341511 18437737424210624384 144109690517720577 18444492411334295583 18428728575753453695 18302628885902000064 4259533815811 18419722475969970176 26740122788038655 1614104180196...

result:

ok Accepted using 983 pigeon(s).

Test #109:

score: 12
Accepted
time: 118ms = 12ms + 106ms

input:

encode
8 14 1000 280024755
955272490816 8774804383388 3168225513893
955272490816 8774804383388 3168225513894
955272490816 8774804383388 3168225513895
955272490816 8774804383388 3168225513896
955272490816 8774804383388 3168225513897
955272490816 8774804383388 3168225513898
955272490816 8774804383388 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
713 1090698354884639 17870283323419394048 4251398048363577344 283726776536399872 134209536 9223090579056885760 288212785039409151 1125831187365888 3296387399687 18409589376787791872 914793674440704 2814749769199104 29686813954047 8070450536542732288 3932160 0
405 46126717774122...

result:

ok Accepted using 983 pigeon(s).

Test #110:

score: 12
Accepted
time: 145ms = 12ms + 133ms

input:

encode
8 14 1000 801753362
3522696027351 7697439575244 2438884314474
3522696027351 7697439575244 2438884314475
3522696027351 7697439575244 2438884314476
3522696027351 7697439575244 2438884314477
3522696027351 7697439575244 2438884314478
3522696027351 7697439575244 2438884314479
3522696027351 7697439...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
300 18446744004994268928 140728898945020 4503324749594616 9007199254740928 72055394880459263 18446713287381876863 18365679280450305024 60473139531760 508 274810798080 576460752303423491 9223372053967536128 9006649532481408 144110755669606527 15564440314205691904 4194176
814 184...

result:

ok Accepted using 983 pigeon(s).

Test #111:

score: 12
Accepted
time: 147ms = 16ms + 131ms

input:

encode
8 14 1000 240002913
2377800376699 8512007177514 6486295604875
2377800376699 8512007177514 6486295604876
2377800376699 8512007177514 6486295604877
2377800376699 8512007177514 6486295604878
2377800376699 8512007177514 6486295604879
2377800376699 8512007177514 6486295604880
2377800376699 8512007...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
8 14 10000 983
374 15691227884276416736 15005127543214506288 2560648303026569488 9998559210138534544 200289228847099 18446744073617170472 612630389889957895 150020458870207478 10380872627616268736 1219555830154657792 7114526326959555981 837954888938835457 7953357010656830464 121423825731583 1...

result:

ok Accepted using 983 pigeon(s).

Subtask #10:

score: 12
Accepted

Test #112:

score: 12
Accepted
time: 175ms = 8ms + 167ms
memory: 11592kb,29052kb

input:

encode
9 20 1000 49682627
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10
0 0 11
0 0 12
0 0 13
0 0 14
0 0 15
0 0 16
0 0 17
0 0 18
0 0 19
0 0 20
0 0 21
0 0 22
0 0 23
0 0 24
0 0 25
0 0 26
0 0 27
0 0 28
0 0 29
0 0 30
0 0 31
0 0 32
0 0 33
0 0 34
0 0 35
0 0 36
0 0 37
0 0 38
0 0 39
0 0 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
891 9223372036855300096 34359738368 35188667056128 2147483648 9223372036854775840 134217728 36029346774777856 70368744210432 2097184 2 536870912 4611686018429485056 8224 536870912 4194304 144115205255725056 72057594037927940 100663296 4503656703490304 0
260 4503599627370498 84...

result:

ok Accepted using 1277 pigeon(s).

Test #113:

score: 12
Accepted
time: 198ms = 36ms + 162ms
memory: 11660kb,29476kb

input:

encode
9 20 1000 575991170
4398046511103 8796093022207 8796093022207
4398046511103 8796093022207 8796093022206
4398046511103 8796093022207 8796093022205
4398046511103 8796093022207 8796093022204
4398046511103 8796093022207 8796093022203
4398046511103 8796093022207 8796093022202
4398046511103 8796093...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
621 34359869697 78853 6753842532590812767 9427201154095251456 576461027315581504 288230376439038614 9935169548410799108 9693734315126947840 12128334946314129418 5468542029209157648 37172289149898761 97108884245708800 648518569948611602 6806421550162509824 9408515071 1836086290...

result:

ok Accepted using 1277 pigeon(s).

Test #114:

score: 12
Accepted
time: 188ms = 28ms + 160ms
memory: 12104kb,29420kb

input:

encode
9 20 1000 798012561
3682631568653 3399195689483 3631890219187
3682631568653 3399195689483 3627595251891
736127494099 8140413827208 4229463991299
736127494099 8140413827208 4229396882435
3686269198035 7287260168981 7123884190751
3686269198035 7287260168981 7123884188703
2922224510321 359088190...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
903 9822438001054060544 162551799050577726 14843864371813154815 7860169519430648068 9007199791611904 161302646158097418 11529788057020826250 508799274222753 2977459895896457216 1649267441664 67896114 4460371107031695488 361172287681986560 0 1198978440699888640 4179340454422118...

result:

ok Accepted using 1277 pigeon(s).

Test #115:

score: 12
Accepted
time: 186ms = 20ms + 166ms
memory: 12408kb,29412kb

input:

encode
9 20 1000 954377859
553174998546 6663598266287 6299028184480
553174998546 6663598266295 6299028184480
1843987794232 1410644580157 2804054364875
1848282761528 1410644580157 2804054364875
1478429591215 4851490558765 3250541883641
1478429591215 2652467303213 3250541883641
652258010768 3401201287...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
858 16140903263517016064 13193871097856 4501950359928832 9204794688391873023 16140619589519147263 1125898833101823 18446744039349846015 17870283871161417728 9223372035781035007 18428738471284703239 18446726481540284400 115343360 35183835480063 13835062453328150528 922336653929...

result:

ok Accepted using 1277 pigeon(s).

Test #116:

score: 12
Accepted
time: 205ms = 30ms + 175ms
memory: 12228kb,29436kb

input:

encode
9 20 1000 917949227
4224775616400 5487522053033 2441822435282
3626688338583 7661697987225 8174151133864
2516443392352 8188798485166 147897628720
2283957806509 318483104237 4327361062334
2943014875112 7119266833557 7979305042865
725364215182 8545634026022 4677926961696
456295322011 24431083056...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
112 1729664831407458683 13466888785736222264 5044035995431849983 18446744073575760448 9225624387565127948 14906928780010323968 3298534891594 3953456785389514235 12800426409637969920 1188950318806205440 2378043161907969694 11240735635606339840 9223723880601970582 74968265374695...

result:

ok Accepted using 1277 pigeon(s).

Test #117:

score: 12
Accepted
time: 204ms = 31ms + 173ms
memory: 12088kb,29076kb

input:

encode
9 20 1000 98600014
3925018020832 6253298270631 3219988633630
456262095205 6930742286471 6423359245989
2487969559709 8596780879064 196211848701
2528392366228 8094647791936 6727598283169
1240245025701 4640287936155 3978981316691
1471463806157 5991060281944 6083763622666
2841659525553 1464987982...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
268 18446743522683445541 4612915955870770306 9297470326702336 35223336257540 731131295721572031 18446744071555794450 8107675873198610432 9673873304552763776 2919469608178679808 18041543240714513 144115188117798912 6615501343928877055 18265450224409396432 13330539355185676293 6...

result:

ok Accepted using 1277 pigeon(s).

Test #118:

score: 12
Accepted
time: 193ms = 26ms + 167ms
memory: 11832kb,29384kb

input:

encode
9 20 1000 170129178
2859601897585 8444990058425 5445579594119
1524367868090 5516415054260 2717534941739
265927080295 6793952772501 5187329563456
2938286300758 940733212827 8732984145613
3135670202405 3240613246459 3285776196704
3906118291148 2087541176684 7059315369112
3230763057491 756007572...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
678 1125899906879579 18154713785372245460 1522995175685770217 7190443206953642746 9223372036853773140 12754334884349084672 37804503419846655 18440796844274483200 21269635760390143 18111606850272666820 12374713099549145820 3892658259139493888 149824404372619867 2958864955249532...

result:

ok Accepted using 1277 pigeon(s).

Test #119:

score: 12
Accepted
time: 199ms = 24ms + 175ms
memory: 12128kb,29128kb

input:

encode
9 20 1000 150207222
335812402080 8713888255945 5822771857615
3141456854090 3154178655587 5931152170090
3817564754623 1500904288451 5236809489500
3095592757149 6380875551310 6230235282487
3477778672307 3445570116250 1845087048271
876331205234 5726171999360 1760082656645
1054204618675 293429170...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
672 9263355064248242176 4711666988072862802 2308096021999111199 18446735272464089088 670152061714694143 18444443120260677632 43021664103 18446744073709551615 18446638073145673731 2691451475425798401 148654796709183488 146952036523504996 18284614310304254500 725431933483526182 ...

result:

ok Accepted using 1277 pigeon(s).

Test #120:

score: 12
Accepted
time: 191ms = 22ms + 169ms
memory: 12124kb,29548kb

input:

encode
9 20 1000 932602816
1967177490745 6956290244092 2536105473252
1388790652897 603423966795 8733301433629
4279582033654 1386794420322 6220620956345
2468084375065 3444874666600 5631576241530
2701734700889 7858315237697 3746231805512
1965494252777 3699056243208 5559185619304
325489584463 271972654...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
815 17566416240640 139610488936857600 18230571291595808768 0 864690853577490431 18437736883044737024 34358689792 8658654068736 2303591210473749504 18014396362000383 18428166725246648812 32767 17870283871161942015 18446744065119625215 18374545742183268479 17293821469591076864 1...

result:

ok Accepted using 1277 pigeon(s).

Test #121:

score: 12
Accepted
time: 199ms = 28ms + 171ms
memory: 11828kb,31232kb

input:

encode
9 20 1000 894266983
1226305641029 5619723386853 3841218999711
230102840328 4009893046951 992818373043
3859644771963 195320355587 3603682560396
1213896496041 4527883913906 2729927904441
3861954416487 7686649635143 398559607805
471154770901 632275165548 3842648436417
4254290765995 677458113674 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
603 17591380738048 4433229809451008 18014261062139904 70368744181759 18374686548391096320 72057542498320384 270215960462376952 140737412857856 123145302441983 16140903263519112960 4503597479884800 33776999352760335 18446462599001276415 9223380832939409408 2147481600 3602879695...

result:

ok Accepted using 1277 pigeon(s).

Test #122:

score: 12
Accepted
time: 183ms = 16ms + 167ms
memory: 11740kb,29124kb

input:

encode
9 20 1000 164785191
58020633647 5063185755856 2800867716271
522986898645 5262797120919 1242767027478
1174187773214 3498399298010 2979865266432
764043059795 6940889414871 5172670169984
3604161685580 6467542390217 5950691500174
556491238811 828055217349 4769713069988
2419919492223 4585566426615...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
665 18444417507105177599 18370468204721104906 13546121839720527 7512254869591703069 18446744073709551615 18446743438020820991 18446744073709551615 18446661663790202880 68892055543 18446744073709551539 14209561886353014848 146613747407650259 12156362184996291716 113490710747143...

result:

ok Accepted using 1277 pigeon(s).

Test #123:

score: 12
Accepted
time: 200ms = 26ms + 174ms
memory: 11752kb,29204kb

input:

encode
9 20 1000 329702287
3684699437389 7545678811739 8158932321464
2467485826325 2859504757156 5640693825124
3010885681358 2605510429230 1763626721612
1121228677648 7673741782456 6882654839224
653088567949 589411294214 8693931192903
3385140201311 3733215833663 1708339578335
1981353293343 677272240...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
128 7 9799832239402909695 18446739675667234812 2305840810192535551 13835062453326573568 65498251264 13229323905401087 18436610974547968960 469761984 1073725503 18445618174876450560 4503596943015936 6685030696878108 33554400 554153868787707 18158513697558093823 1787028332140651...

result:

ok Accepted using 1277 pigeon(s).

Test #124:

score: 12
Accepted
time: 190ms = 28ms + 162ms
memory: 11868kb,29512kb

input:

encode
9 20 1000 181068066
2543862971707 307273714413 6041453358192
2543862971707 307273714413 6041453358193
2543862971707 307273714413 6041453358194
2543862971707 307273714413 6041453358195
2543862971707 307273714413 6041453358196
2543862971707 307273714413 6041453358197
2543862971707 307273714413 ...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
55 16450746399965970519 17077370022835781635 13871092556319686657 72916312619254784 163893203238395968 70368744196455 18295873486192492163 13979173243358019602 538028600 17149707381026847626 39828715099659085 5621213614586726364 18187787095135406668 9660227882719314097 2558067...

result:

ok Accepted using 1277 pigeon(s).

Test #125:

score: 12
Accepted
time: 188ms = 19ms + 169ms
memory: 12244kb,29512kb

input:

encode
9 20 1000 531071951
3924378006837 3001048624338 5754478500723
3924378006837 3001048624338 5754478500724
3924378006837 3001048624338 5754478500725
3924378006837 3001048624338 5754478500726
3924378006837 3001048624338 5754478500727
3924378006837 3001048624338 5754478500728
3924378006837 3001048...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
802 6881422165296545791 18446744073709551607 15146619340610380257 9074544301676962020 1154376886487351296 9114326667856 1875766974426906624 36591760931296216 12682136550674206144 10401098527040078892 5977701393648520 4697988636358608896 4993296 6923328504801003966 314773466455...

result:

ok Accepted using 1277 pigeon(s).

Test #126:

score: 12
Accepted
time: 182ms = 20ms + 162ms
memory: 11832kb,29388kb

input:

encode
9 20 1000 517039479
1019364332405 6502235108075 2048979575289
1019364332405 6502235108075 2048979575290
1019364332405 6502235108075 2048979575291
1019364332405 6502235108075 2048979575292
1019364332405 6502235108075 2048979575293
1019364332405 6502235108075 2048979575294
1019364332405 6502235...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
662 11266695992913783 18446744073642397892 9295430775819206655 18446744071516809993 1152921504623624192 653184115280969727 18446677307531743232 75938687514312703 18446742232470142984 67141632 18032785289642400 369592044376555776 97898271604735 18446744073709419940 102328820408...

result:

ok Accepted using 1277 pigeon(s).

Test #127:

score: 12
Accepted
time: 199ms = 31ms + 168ms
memory: 12628kb,29216kb

input:

encode
9 20 1000 301786476
3158685203012 2200406400907 5609966204769
3158685203012 2200406400907 5609966204770
3158685203012 2200406400907 5609966204771
3158685203012 2200406400907 5609966204772
3158685203012 2200406400907 5609966204773
3158685203012 2200406400907 5609966204774
3158685203012 2200406...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
130 18437736883044741118 18874366 35184371826688 4611682719892504576 16104872267476909568 8589787136 271656680448 18014398509481983 18446744071562070015 18424226075572700672 8321498880 4433230950301632 8589926400 144115179485929471 18338657682652674048 30064771072 180143985094...

result:

ok Accepted using 1277 pigeon(s).

Test #128:

score: 12
Accepted
time: 187ms = 19ms + 168ms
memory: 11732kb,29112kb

input:

encode
9 20 1000 481004598
2144975281912 1223951139349 1797260812630
2144975281912 1223951139349 1797260812631
2144975281912 1223951139349 1797260812632
2144975281912 1223951139349 1797260812633
2144975281912 1223951139349 1797260812634
2144975281912 1223951139349 1797260812635
2144975281912 1223951...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
915 17591112302592 6685030696878143 13817043656772689856 939523584 8581545976 140462610710527 16131893865241121792 17045647360 63350767616 16325548649218559 17293822569102966783 13835060271485288447 18160765497337970719 18446321861244485664 65535 17293823668614332400 281474775...

result:

ok Accepted using 1277 pigeon(s).

Test #129:

score: 12
Accepted
time: 161ms = 11ms + 150ms
memory: 12052kb,29116kb

input:

encode
9 20 1000 135495143
2905525429145 8306037090562 6070231918803
2905525429145 8306037090562 6070231918804
2905525429145 8306037090562 6070231918805
2905525429145 8306037090562 6070231918806
2905525429145 8306037090562 6070231918807
2905525429145 8306037090562 6070231918808
2905525429145 8306037...

input:

w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...

input:

decode
9 20 10000 1277
481 18374297708358817320 8329126035823600425 9223372047535503359 18446744017519830024 529 14956137703148613590 6197168608726024192 12682148645303240706 3688338072718809344 18015498021109760 2199023256071 12384648836373544959 18410492078470725632 515964655 9223297270064087039 1...

result:

ok Accepted using 1277 pigeon(s).