QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#263097#7815. 结构体ucup-team004100 ✓2ms3700kbC++203.2kb2023-11-24 15:16:282023-11-24 15:16:29

Judging History

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

  • [2023-11-24 15:16:29]
  • 评测
  • 测评结果:100
  • 用时:2ms
  • 内存:3700kb
  • [2023-11-24 15:16:28]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;

struct Element {
    i64 addr;
    std::string type;
    std::string name;
};

struct TypeInfo {
    int align;
    i64 size;
    std::vector<Element> elements;
};

std::map<std::string, TypeInfo> typeInfo;
TypeInfo global;

i64 alignTo(i64 addr, int align) {
    if (addr % align != 0) {
        addr += align - addr % align;
    }
    return addr;
}

void putElement(TypeInfo &info, const std::string &type, const std::string &name) {
    Element element;
    int align = typeInfo[type].align;
    element.addr = alignTo(info.size, align);
    element.type = type;
    element.name = name;
    info.align = std::max(info.align, align);
    info.size = element.addr + typeInfo[type].size;
    info.elements.push_back(element);
}

i64 getAddr(const TypeInfo &info, const std::string &s, int i = 0) {
    int ni = s.find('.', i);
    if (ni == -1) {
        ni = s.size();
    }
    std::string name = s.substr(i, ni - i);
    int j = 0;
    while (info.elements[j].name != name) {
        j += 1;
    }
    if (ni == s.size()) {
        return info.elements[j].addr;
    }
    return info.elements[j].addr + getAddr(typeInfo[info.elements[j].type], s, ni + 1);
}

bool getElement(const TypeInfo &info, i64 addr, std::string &s) {
    if (info.elements.empty()) {
        return addr < info.size;
    }
    for (auto e : info.elements) {
        if (e.addr <= addr && addr < e.addr + typeInfo[e.type].size) {
            s += e.name + '.';
            return getElement(typeInfo[e.type], addr - e.addr, s);
        }
    }
    return false;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    typeInfo["byte"] = {1, 1, {}};
    typeInfo["short"] = {2, 2, {}};
    typeInfo["int"] = {4, 4, {}};
    typeInfo["long"] = {8, 8, {}};
    
    int n;
    std::cin >> n;
    
    while (n--) {
        int op;
        std::cin >> op;
        
        if (op == 1) {
            std::string name;
            std::cin >> name;
            int k;
            std::cin >> k;
            
            TypeInfo info;
            info.align = 0;
            info.size = 0;
            for (int i = 0; i < k; i++) {
                std::string type, name;
                std::cin >> type >> name;
                putElement(info, type, name);
            }
            info.size = alignTo(info.size, info.align);
            typeInfo[name] = info;
            std::cout << info.size << " " << info.align << "\n";
        } else if (op == 2) {
            std::string type, name;
            std::cin >> type >> name;
            putElement(global, type, name);
            std::cout << global.elements.back().addr << "\n";
        } else if (op == 3) {
            std::string s;
            std::cin >> s;
            
            std::cout << getAddr(global, s) << "\n";
        } else {
            i64 addr;
            std::cin >> addr;
            
            std::string s;
            if (!getElement(global, addr, s)) {
                std::cout << "ERR\n";
            } else {
                s.pop_back();
                std::cout << s << "\n";
            }
        }
    }
    
    return 0;
}

詳細信息

Test #1:

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

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: 3456kb

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: 1ms
memory: 3432kb

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: 3444kb

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: 0ms
memory: 3524kb

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: 3488kb

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: 3508kb

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: 3408kb

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: 1ms
memory: 3612kb

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: 3648kb

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: 3648kb

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: 3620kb

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: 0ms
memory: 3700kb

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: 0ms
memory: 3624kb

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: 2ms
memory: 3616kb

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: 3632kb

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: 3580kb

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: 3676kb

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: 3680kb

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: 1ms
memory: 3624kb

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