QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#300061#7815. 结构体SoyTony100 ✓2ms4196kbC++144.6kb2024-01-07 17:05:302024-01-07 17:05:30

Judging History

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

  • [2024-01-07 17:05:30]
  • 评测
  • 测评结果:100
  • 用时:2ms
  • 内存:4196kb
  • [2024-01-07 17:05:30]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const int maxn=110;

inline ll read(){
    ll x=0,w=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')w=-1;c=getchar();}
    while(c<='9'&&c>='0'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}
    return x*w;
}

inline void check(ll &A,ll B){
    A=(A+B-1)/B*B;
}

int n,tot;
string s1,s2;
map<string,int> mp;
ll mx[maxn],siz[maxn];

struct Data{
    int type;
    string name;
    Data()=default;
    Data(int type_,string name_):type(type_),name(name_){}
};

ll P;
vector<Data> D[maxn],V; 
vector<string> output;

int main(){
    // freopen("struct.in","r",stdin);
    // freopen("struct.out","w",stdout);
    n=read();
    mp["byte"]=1,mx[1]=1,siz[1]=1;
    mp["short"]=2,mx[2]=2,siz[2]=2;
    mp["int"]=3,mx[3]=4,siz[3]=4;
    mp["long"]=4,mx[4]=8,siz[4]=8;
    tot=4;
    while(n--){
        int opt=read();
        if(opt==1){
            cin>>s1;
            mp[s1]=++tot;
            int k=read();
            ll pos=0;
            for(int i=1;i<=k;++i){
                cin>>s1>>s2;
                // cerr<<s1<<" "<<s2<<endl;
                int type=mp[s1];
                mx[tot]=max(mx[tot],mx[type]);
                check(pos,mx[type]);
                pos+=siz[type];
                D[tot].push_back(Data(type,s2));
            }
            check(pos,mx[tot]);
            siz[tot]=pos;
            printf("%lld %lld\n",siz[tot],mx[tot]);
        }
        else if(opt==2){
            cin>>s1>>s2;
            int type=mp[s1];
            check(P,mx[type]);
            V.push_back(Data(type,s2));
            printf("%lld\n",P);
            P+=siz[type];
        }
        else if(opt==3){
            cin>>s1;
            s1+=".";
            ll pos=0;
            bool chk=true;
            for(int i=0,j=0,type=-1;;++i){
                s2="";
                while(s1[j]!='.') s2+=s1[j++];
                // cout<<"s2:"<<s2<<endl;
                ++j;
                if(!i){
                    for(Data now:V){
                        check(pos,mx[now.type]);
                        if(now.name==s2){
                            type=now.type;
                            break;
                        }
                        pos+=siz[now.type];
                    }
                }
                else{
                    int tmptype=type;
                    type=-1;
                    for(Data now:D[tmptype]){
                        check(pos,mx[now.type]);
                        if(now.name==s2){
                            type=now.type;
                            break;
                        }
                        pos+=siz[now.type];
                    }
                }
                if(type==-1){
                    chk=false;
                    break;
                }
                if(j==s1.size()) break;
                // cerr<<"type:"<<type<<" pos:"<<pos<<endl;
            }
            if(!chk) printf("ERR\n");
            else printf("%lld\n",pos);
        }
        else{
            ll Pos=read(),pos=0;
            bool chk=true;
            output.clear();
            for(int i=0,type=-1;;++i){
                if(!i){
                    for(Data now:V){
                        check(pos,mx[now.type]);
                        if(pos<=Pos&&Pos<pos+siz[now.type]){
                            type=now.type;
                            output.push_back(now.name);
                            break;
                        }
                        pos+=siz[now.type];
                    }
                }
                else{
                    int tmptype=type;
                    type=-1;
                    for(Data now:D[tmptype]){
                        check(pos,mx[now.type]);
                        if(pos<=Pos&&Pos<pos+siz[now.type]){
                            type=now.type;
                            output.push_back(now.name);
                            break;
                        }
                        pos+=siz[now.type];
                    }
                }
                // cerr<<"type:"<<type<<" pos:"<<pos<<endl;
                if(type==-1){
                    chk=false;
                    break;
                }
                if(type<=4) break;
            }
            if(!chk) printf("ERR\n");
            else{
                for(int i=0;i<output.size();++i){
                    cout<<output[i];
                    if(i+1<output.size()) cout<<".";
                }
                cout<<endl;
            }
        }
    }
    return 0;
}

详细

Test #1:

score: 5
Accepted
time: 1ms
memory: 3620kb

input:

93
2 long gkwc
3 gkwc
2 long omvjdthb
4 1
2 long cumx
3 omvjdthb
4 16
3 gkwc
2 long tebdginn
4 15
4 30
3 omvjdthb
4 22
4 37
2 long nbghbbahln
2 long kkjzl
4 9
3 nbghbbahln
4 31
3 nbghbbahln
3 gkwc
2 long hjzfa
2 long tptemwur
4 39
3 tptemwur
2 long sjybn
4 8
4 15
3 cumx
2 long xathyrnc
4 32
3 xathyr...

output:

0
0
8
gkwc
16
8
cumx
0
24
omvjdthb
tebdginn
8
cumx
ERR
32
40
omvjdthb
32
tebdginn
32
0
48
56
nbghbbahln
56
64
omvjdthb
omvjdthb
16
72
nbghbbahln
72
72
80
88
ERR
cumx
hjzfa
32
8
16
omvjdthb
ERR
96
104
omvjdthb
64
96
cumx
8
112
120
tptemwur
128
136
144
cumx
48
88
152
sjybn
144
48
16
80
gkwc
96
tptemwu...

result:

ok 93 lines

Test #2:

score: 5
Accepted
time: 1ms
memory: 3720kb

input:

100
4 0
4 4
2 byte szqir
2 long fweahddll
2 byte dvqu
3 szqir
2 long wqcnqxppvg
3 szqir
4 9
4 33
3 wqcnqxppvg
4 38
4 5
4 33
2 short erhxh
2 short wwsp
4 3
3 szqir
4 42
2 short pxkwnp
4 15
2 int teuwwrw
4 45
3 erhxh
2 int uuycypz
3 uuycypz
4 48
4 35
4 6
3 wqcnqxppvg
2 byte yvgc
3 yvgc
3 teuwwrw
4 25
...

output:

ERR
ERR
0
8
16
0
24
0
fweahddll
ERR
24
ERR
ERR
ERR
32
34
ERR
0
ERR
36
fweahddll
40
ERR
32
44
44
ERR
wwsp
ERR
24
48
48
40
wqcnqxppvg
8
34
0
ERR
34
8
ERR
ERR
dvqu
ERR
36
ERR
ERR
49
32
ERR
50
52
wwsp
56
erhxh
yuoquzsyr
ERR
0
ERR
24
24
64
72
56
74
32
teuwwrw
80
40
ERR
ERR
80
zuwd
88
teuwwrw
34
96
80
104...

result:

ok 100 lines

Test #3:

score: 5
Accepted
time: 0ms
memory: 3796kb

input:

99
2 long mrbfn
4 1
3 mrbfn
3 mrbfn
3 mrbfn
3 mrbfn
2 byte oosmberlsb
3 mrbfn
3 oosmberlsb
2 byte auhmoewi
4 7
4 3
2 long jplopgx
4 0
4 31
2 int qqgjpu
2 long plfawkhtd
3 auhmoewi
3 plfawkhtd
2 int uwue
2 long muvlnlgqn
4 46
4 46
4 22
2 long inhosie
3 auhmoewi
3 oosmberlsb
2 byte pziz
2 byte anyxdru...

output:

0
mrbfn
0
0
0
0
8
0
8
9
mrbfn
mrbfn
16
mrbfn
ERR
24
32
9
32
40
48
ERR
ERR
jplopgx
56
9
8
64
65
ERR
56
mrbfn
plfawkhtd
plfawkhtd
ERR
ERR
66
72
80
56
88
0
24
80
80
inhosie
ERR
96
64
104
112
66
120
104
120
128
0
ERR
9
136
144
145
152
65
160
anyxdruw
164
ERR
168
72
170
wbpatry
152
48
cjzosekh
cbnapeqnwr...

result:

ok 99 lines

Test #4:

score: 5
Accepted
time: 1ms
memory: 3776kb

input:

99
1 lfqikjtpgg 97
long mbtn
long snpj
long fqb
long vdnkbv
long zqqjxhrj
long upp
long oe
long lv
long sea
long a
long fdymaqnuy
long oyshjkhm
long secuap
long o
long uvq
long xpw
long fsytmbpaaw
long rx
long nhmski
long hzop
long noy
long mqbitjlx
long jewquyks
long auntk
long ak
long bsksgoi
long...

output:

776 8
0
608
jrrer.vdnkbv
0
368
jrrer.qzotxqv
616
776
zeewv.fqb
zeewv.hzop
376
jrrer.lqyfurmsv
1256
1552
1560
2336
jrrer.fsytmbpaaw
jrrer.vfhi
3112
ERR
3888
ERR
3896
112
3904
a.drybikqbr
4680
rrb.kmk
ERR
jrrer.o
uwarglwn.hzop
4680
1560
888
yqqjqq.t
4688
880
rrb.abeqpdi
jrrer.ccxetwav
5464
5472
4680
6...

result:

ok 99 lines

Test #5:

score: 5
Accepted
time: 1ms
memory: 3992kb

input:

92
1 stmyil 94
long frzkeaq
long uloz
long khxrakhvl
long mgmigozwpb
long gcmzgib
long tktaj
long ttgattk
long ugnfjyqjei
long qqihkphedp
long jps
long bhdunqh
long qsefx
long iujkjmuolx
long lpyffp
long qryknjg
long utrepva
long dsmu
long qxazh
long nc
long u
long lzslpheclz
long ftjm
long chwf
lon...

output:

752 8
0
mtsoynlcr.kritlqvtrq
752
1504
480
896
0
1512
bbq.lzslpheclz
exq.khxrakhvl
1768
2264
2272
3024
qvv.vgkrxwdyu
ERR
3776
3784
3792
3776
3384
3800
4552
3784
qvv.uwd
4552
4560
4568
5320
5328
xzajney.itvqydfpjr
rk.lshn
3032
3776
4528
5336
4560
5344
bbq.hr
rk.nc
hyxxgtvpe.qxazh
3024
6096
6104
4560
b...

result:

ok 92 lines

Test #6:

score: 5
Accepted
time: 1ms
memory: 3704kb

input:

98
1 mmozfzqkeq 98
byte snth
short p
short ukfuxuar
byte vidqzvet
short mtzfq
byte umfo
short rxzppsvp
short jkcngxzj
byte upvqni
short wnthhncby
byte zzwunbs
short hsmgblo
short ccgvhtx
byte wmru
byte gfhcr
short fwfanwrr
byte wyhihbma
byte rppirq
short nspggyr
short wkntvbwwlv
byte hoqqz
byte fvcn...

output:

162 2
0
ERR
ERR
0
ERR
0
2
168
168
hql.erpywn
168
176
hql.wnthhncby
168
176
168
180
hql.leiyj
ERR
ERR
342
504
346
314
342
2
ERR
504
666
828
963
iu.wnthhncby
sb.tsnrfpv
990
hql.wkntvbwwlv
izphpoqi.rwabu
1152
1160
168
1168
1330
1492
crizxpw.jfipsmc
0
1492
1496
176
wmattvkzzs.hsmgblo
trlpnaik.qmnobf
116...

result:

ok 98 lines

Test #7:

score: 5
Accepted
time: 1ms
memory: 3720kb

input:

92
1 xreiqsyjsl 94
int joqtxmb
byte eobzfc
int yglime
int ghhoizgeq
long kiza
long aef
int ahkehlz
byte kgzpv
long nf
byte hmshwxalu
short tniregati
byte m
short ybauqfo
byte tmtnxog
int etgavrbmqj
short mdirp
int qofuzp
int lzyvpl
int tfdwv
int obskuccugg
byte bgq
short ze
long bpyzngywya
int rcyis...

output:

496 8
0
ERR
ERR
ERR
ERR
0
ERR
2
ERR
ERR
4
2
0
8
0
2
16
16
20
24
etgavrbmqj.joqtxmb
4
etgavrbmqj.xgzmk
2
520
16
etgavrbmqj.pnofbzjny
528
592
ERR
304
1024
520
agifvelzil.xgzmk
1032
4
1528
1528
agifvelzil.lzbjozvrzf
ERR
1530
1532
1536
1538
0
etgavrbmqj.nmoqjx
1544
yn.oddtzstfh
mpvthlnla.lzyvpl
4
yn.nhm...

result:

ok 92 lines

Test #8:

score: 5
Accepted
time: 1ms
memory: 3788kb

input:

93
1 spkif 90
short klz
short wlbylhewfp
short kyaoz
byte iuszpejqeb
short hlbbgkvnhn
short xwsavtujm
byte pgfwluu
byte mbsh
short ybzxrav
short ilmd
short dvntuiawh
short ucbdcgwkyr
short m
byte qefbom
short rpdiishks
short dbq
byte amiipjf
short rcuw
byte ct
short brdieyded
short snuehuwrbf
byte o...

output:

164 2
0
0
mslenxromt
8
16
ERR
kkyubikfab
0
gngtzlv.jwxveqixgt
ERR
ERR
16
180
180
gngtzlv.ikewaav
gngtzlv.pgfwluu
16
ERR
182
182
184
186
350
ebuyegvf.xlh
520
528
ebuyegvf.ooabb
536
700
180
ERR
864
864
8
868
1032
1196
520
lmwatukg.cpchxhefw
1360
watu
864
gngtzlv.yo
1368
gngtzlv.cusgqxfo
rf.dckfjne
ebu...

result:

ok 93 lines

Test #9:

score: 5
Accepted
time: 0ms
memory: 4196kb

input:

100
1 tmwddcqr 96
long vc
long bzjxjo
long rpfgxjw
long rwfnwjxezo
long evovfc
long gj
long zwoml
long qtgongwrsf
long qoti
long xoisdmvl
long vkcbsjti
long lyv
long ipjvh
long lmemkym
long zybinjoacb
long xo
long opaxv
long fd
long cheprbq
long vwmixkoa
long qkxjkn
long ty
long ad
long nrrm
long kl...

output:

768 8
800 8
640 8
112 8
736 8
200 8
760 8
776 8
424 8
784 8
ERR
ERR
0
112
96
888
fpqgnrislz.ygsfaifx
1624
2408
woshrig.bmvb
woshrig.hcwvvtmis
800
48
2832
2744
800 8
ERR
3256
4056
4856
568 8
woshrig.uqlg
1624
f.uopwisq
384
2840
4864
776 8
toqmlsia.kqmumt
f.bjma
woshrig.cqtnvwiaxa
ERR
4928
woshrig.urn...

result:

ok 100 lines

Test #10:

score: 5
Accepted
time: 1ms
memory: 3908kb

input:

94
1 oeareonbmc 94
long sjlbu
long ddjtxqy
long ac
long rjmwvryp
long bjw
long kjxs
long dns
long wycl
long scucpcfki
long vhotgxwf
long yfgvgw
long xb
long um
long cmcuihmv
long jwyuguj
long dl
long hgecyw
long cn
long xrwhhsqoar
long xfajrvvuy
long pg
long ln
long bwgziqt
long knwn
long mjmz
long ...

output:

752 8
776 8
672 8
720 8
760 8
536 8
760 8
632 8
776 8
760 8
ERR
0
528
760
hydigzwwgn.qd
hydigzwwgn.otwgkcyef
hydigzwwgn.atgrr
hydigzwwgn.itqx
1520
648 8
760
2280
2928
1192
2864
784
qbwbfxy.yftp
hydigzwwgn.dgwtdm
736 8
qbwbfxy.jfjkrt
632 8
3576
4096
760 8
1112
txmulyulzl.orbx
416
2280
d.stqtadsc
hydi...

result:

ok 94 lines

Test #11:

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

input:

100
1 qg 75
short imvphecx
long tgthzzocgy
int z
long rdkrbwqi
long bkzeqx
byte ebcxwfjeka
long ugvjxbayyc
int srjda
long ah
short nhqbw
int twpca
byte hynzjak
long mwrjaitjf
byte qeensxo
short oc
int pniisvwlr
int yvqoaipq
long nwokprd
long pryksxsjti
byte zhbuomugxl
int bgk
byte luo
byte kmimxmj
b...

output:

368 8
376 8
424 8
448 8
162 2
448 8
472 8
472 8
360 8
288 8
408 8
0
288 8
164
272 8
448
vledfvupie.bcwbyjhb
416 8
hmjam.gb
668
440 8
504
432 8
ERR
720
1160
16 4
1576
2016
2304
124
2680
520 8
2680
2384
432 8
2696
3144
ERR
272 8
440 8
3144
424 8
3664
376 8
4096
96 1
4536
170 2
4704
ERR
146 2
j.wypzwg
...

result:

ok 100 lines

Test #12:

score: 5
Accepted
time: 1ms
memory: 4140kb

input:

98
1 prjerge 52
short baiklk
short pdauxtmhcs
long bmutcn
long xhrktulr
short gxqgh
short ylxevjych
short rgd
byte gixpucez
int bbmq
byte giezc
short goonshi
byte pupsmxs
int jmadko
byte lziz
short azfctnm
long pxlp
int lcezuwix
int pwcmndzare
int isjkucax
int tngygloe
int vjcs
int dbcsddgz
short ct...

output:

240 8
496 8
360 8
90 2
61 1
164 2
240 4
208 8
416 8
472 8
0
208
496 8
488 8
216
n.itlmw
n.saumwdw
704
872
64 8
sc.wypmrhgs
sc.ly
1360
1568
1568
1632
1386
704
0
1632
1640
408 8
1568
ERR
224 8
148 2
1632
tzmkyojv.rjzj
tzmkyojv.axuqyhbho
1680
1592
fkgnvmnohc.jkkeu
kybrllmdrx.kklcmqfcl
472 8
424 8
400 8...

result:

ok 98 lines

Test #13:

score: 5
Accepted
time: 1ms
memory: 4124kb

input:

95
1 icyrswqfl 93
short qffx
byte lkojhr
long hhsbxdps
long gcsi
long hiznsou
short hjwpmzywv
int hhxyuk
byte vrudbiwl
byte cqmcxfx
long jzdrah
int uafucqu
int gwixgsyfa
short ezyti
long iczdyjxa
short tc
short vyvozoirs
long m
int kpmg
short ecxfhjhfu
short gwdqiiza
int yfjmrewujt
int hl
long t
lon...

output:

472 8
488 8
280 8
480 8
154 2
320 8
480 8
456 8
416 8
408 8
0
384
464 8
rltmyrzog.lk
416
360 8
224 8
656
ERR
416 8
880
tynqrri.ynb
88 2
440 8
268 4
1040
1264
1040
1272
1329
ERR
392 8
288 8
dpoejedj.ynx
336 8
dpoejedj.athxx
288 8
ERR
144 8
408 8
1384
dpoejedj.spu
1688
tynqrri.yhfmk
716
tynqrri.xxnfi
...

result:

ok 95 lines

Test #14:

score: 5
Accepted
time: 1ms
memory: 3912kb

input:

93
1 rrcruvb 100
long gbrpkh
long o
long npx
long fqbwyv
long cer
long xtmxwgset
long slohh
long r
long kkljaga
long wkesor
long belhrmxthz
long bw
long vx
long wfqc
long nqdvlk
long v
long mlgm
long hioyoss
long rhpyhqr
long troazjcq
long got
long mxkp
long nwayf
long qofxrrhp
long ttskfndao
long j...

output:

800 8
648 8
728 8
144 8
696 8
696 8
248 8
800 8
776 8
776 8
51168 8
ERR
30960 8
0
jfrmogf.aeq.ttskfndao
15832
399432 8
386656 8
6168
jfrmogf.lc.cabonsgj
2433544 8
4680
30960
4530576 8
kk.imudvhcvt.aievla.grvkv
430392
dpcte.tkdjn.vqazwgamhi.snlwec.lmtmgnsl
2432
17328
10448360 8
2863936
7394512
778116...

result:

ok 93 lines

Test #15:

score: 5
Accepted
time: 0ms
memory: 3824kb

input:

92
1 mfqfaoi 51
long vgiijn
long kqvmcutd
long kkqmfdmdsg
long we
long h
long lx
long bdzy
long tqb
long ayybs
long iefznflod
long qjw
long xq
long hajgbfpuqj
long otlrrbqpy
long xpxyro
long lum
long umizkapzp
long jxjjgsuab
long aesd
long redlyai
long htpfoi
long eyo
long hkc
long hb
long wwt
long ...

output:

408 8
512 8
752 8
736 8
744 8
408 8
736 8
664 8
768 8
792 8
0
512
51120 8
nnofwvu.lcfawdwx
0
792
51912
57024 8
xulktgcyj.lplnml.riszxar
51912
504608 8
52424
ERR
472864 8
4676512 8
xulktgcyj.uzqpphz.qss
52680
52832
uxlphxmpxp.xipip.agfe.wmdh
uxlphxmpxp.ctg.yvamqxu.gcwro.ubicgj
4729344
uxlphxmpxp.cdgz...

result:

ok 92 lines

Test #16:

score: 5
Accepted
time: 1ms
memory: 3936kb

input:

92
1 itmex 54
long qlmtjv
long eoiw
long ef
long imfhgcc
long cvvwlhqj
long pwrrrcarid
long ejs
long v
long cjl
long qfhsxdx
long opqhk
long rtyfmpb
long cgefjpnsyj
long oaovfhc
long vun
long thwqf
long hhdrhsizr
long ckwl
long gaxdzp
long mwcw
long knjp
long zcemzmfs
long zlnjmriio
long oein
long s...

output:

432 8
696 8
784 8
448 8
800 8
536 8
760 8
760 8
256 8
720 8
ERR
0
144
hcfxyzah.jjogvpva
51976 8
hcfxyzah.noszqk
hcfxyzah.jjogvpva
47464 8
hcfxyzah.hx
ERR
104
hcfxyzah.vxtkauuumx
0
hcfxyzah.kfhepxm
hcfxyzah.kfhepxm
256
200
688
240
168
hcfxyzah.anizchnv
467184 8
944
952
712
985968 8
hzgekqest.radzspon...

result:

ok 92 lines

Test #17:

score: 5
Accepted
time: 1ms
memory: 3900kb

input:

94
1 gzvgm 96
int ozzmlzdcs
short lzf
int tc
int cpagll
byte jktmts
long qtsyn
long rfyehp
int dmfpk
byte dourj
byte aoqijd
short er
int aykwg
byte bozawefpt
short kodpn
short lk
byte xxem
byte cvo
long vdowzxhn
short rutrrcfua
short wev
short wnkufo
byte hvo
int ovnbmuq
long rcx
short ngtdtdxt
byte...

output:

400 8
74 1
160 8
114 2
400 8
408 8
224 4
344 8
400 8
91 1
ERR
0
pyoatyr.brh
18400 8
38
76
16576 8
114
ggx.bn
5568 2
ggx.ufcnsru
236184 8
208
ERR
50
165
141
4197
16784
252968
141072 8
114
1463344 8
2431368 8
36
489152
489312
ilduuhrkd.mi.ws.rupf
6288288 8
489392
ilduuhrkd.mi.lrguw.nkzolzq
13226336 8
...

result:

ok 94 lines

Test #18:

score: 5
Accepted
time: 1ms
memory: 3868kb

input:

92
1 pyrj 59
short qjazriblv
int udo
long ifisemk
int inso
byte lpmnuevtab
int ilrtum
byte aucf
byte qvwxbxcevi
long sxboxvu
byte rjfpvq
byte iteamtvj
int lrsf
short nnbnd
long ndiwpi
short hvcpdhh
short rqmusonxma
short agoriisqdu
short jqskvkw
short qyq
long zvmpxd
byte mbb
long kpabhzk
int qktde
...

output:

280 8
91 1
288 8
472 8
138 2
448 8
312 8
432 8
440 8
99 1
0
0
440
ezfwp.mpyc
490
11560 8
viwnadheef.vtp
18520 8
544
ERR
4456
ERR
76888 8
ERR
165232 8
512
19064
632504 8
26244
95952
544
zcttgv.cxdw.ajvakalw.ngrarqq
261184
893688
1652968 8
1526192
ERR
1507522
1526200
1537760
3734728 8
9188192 8
167610...

result:

ok 92 lines

Test #19:

score: 5
Accepted
time: 1ms
memory: 3948kb

input:

100
1 deam 92
int puxuhin
byte qzbt
byte oelfvt
short qjhpt
short zvmv
byte hmdzptx
long mctwgosxff
short uygqtcthn
long ykshnocnt
int ybsvabraeu
int qzwh
long brrtu
byte fide
byte lisonhykl
short pmsend
byte dhqyw
short rso
long vmuhoz
byte kasnh
long lyjjfblrb
short uzsagojr
byte odqcqtjcvs
byte m...

output:

408 8
32 4
196 4
472 8
456 8
352 8
504 8
16 4
376 8
456 8
ERR
0
ERR
408
15264 8
320
456
ryxn.fbppogwj
15576 8
ERR
128 2
808
16072
176440 8
16200
214072 8
1082280 8
16396
1675448 8
16400
1691848
1692304
8003416 8
15 1
16087
ERR
1692776
9104352 8
43026288 8
1692792
4440 4
1869232
16200
11684
1693588
f...

result:

ok 100 lines

Test #20:

score: 5
Accepted
time: 2ms
memory: 4148kb

input:

100
1 vmtrvlmprp 99
byte hbvh
long ifeouvbu
long ylh
long hqgw
int wcs
short oavgeme
byte ppmssx
byte prdykjzgw
byte obta
short yzf
byte ozqfbozj
short vuypsqhd
byte anwbcc
byte iiungtbs
short dkhape
byte ixh
short gbdm
long ijrczrv
short rgkc
short amskm
short jguttrfv
short dotlif
byte tqvwccaafx
...

output:

440 8
67 1
464 8
256 4
16 8
150 2
472 8
248 4
264 8
512 8
ERR
16984 8
12008 4
ERR
151776 8
ERR
0
uj.yuzrajlheu
472
3172
17456
10288
243816 8
34440
gf.pd.yobdmdxdq
2865 1
2735 1
34448
34888
qlr.hqxbr.jezqmxasd
ERR
119636 4
37624
1524560 8
25600
157264
2174976 8
1681824
ERR
1684689
1687424
nsfjbawrd.e...

result:

ok 100 lines