QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#619708 | #7815. 结构体 | tiankonguse | 100 ✓ | 2ms | 5076kb | C++20 | 8.7kb | 2024-10-07 15:06:03 | 2024-10-07 15:06:06 |
Judging History
answer
/*
ID: tiankonguse
TASK: struct
LANG: C++
CONTEST: CSP-S 2023
qoj: https://qoj.ac/contest/1428/problem/7815
luogu: https://www.luogu.com.cn/problem/P9754
*/
#define TASK "struct3"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll debug = 0;
#define myprintf(...) \
do { \
if (debug) fprintf(stdout, __VA_ARGS__); \
} while (0)
void InitIO() {
// #ifndef USACO_LOCAL_JUDGE
// freopen(TASK ".in", "r", stdin);
// freopen(TASK ".out", "w", stdout);
// #endif
}
class Member {
public:
string type;
string name;
ll offset;
Member(const string& type_ = "", const string& name_ = "", ll offset_ = 0)
: type(type_), name(name_), offset(offset_) {}
};
class Type {
public:
bool base_type;
ll type_size;
ll align_size;
const std::string type_name;
vector<Member> childs;
std::unordered_map<string, ll> childName2Index;
std::map<ll, ll> offset2Index; // 储存成员的起始位置
Type(const string& type_name_ = "", const ll type_size_ = 0,
const bool base_type_ = false)
: type_name(type_name_) {
type_size = type_size_;
align_size = type_size_; // 默认对齐大小与类型大小一致
base_type = base_type_;
}
const Member* AddMember(const string& child_name_, const class Type* child_) {
if (childName2Index.count(child_name_)) {
assert(1);
}
assert(child_);
const std::string& child_type = child_->type_name;
const ll child_size = child_->type_size;
const ll child_align = child_->align_size;
this->align_size = max(this->align_size, child_align);
ll offset = this->type_size;
offset = (offset + child_align - 1) / child_align * child_align;
// myprintf(
// "Type[%s] add member[%lld]: childType[%s] childName[%s] "
// "childSize[%lld] "
// "childAlignSize[%lld] childOffset[%lld] max_align_size[%lld]\n",
// this->type_name.c_str(), ll(childs.size()), child_type.c_str(),
// child_name_.c_str(), child_size, child_align, offset,
// this->align_size);
this->childs.push_back(Member(child_type, child_name_, offset));
this->childName2Index[child_name_] = childs.size() - 1;
this->offset2Index[offset] = childs.size() - 1;
this->type_size = offset + child_->type_size;
return &this->childs.back();
}
void EndMember() {
this->type_size = (this->type_size + this->align_size - 1) /
this->align_size * this->align_size;
}
const Member* GetMember(const string& name_) const {
auto it = childName2Index.find(name_);
if (it == childName2Index.end()) return nullptr;
return &childs[it->second];
}
ll GetChildNum() const { return childs.size(); }
};
vector<Type> types;
unordered_map<string, ll> typeName2Index;
Type* GetType(const string& name) {
auto it = typeName2Index.find(name);
if (it == typeName2Index.end()) return nullptr;
return &types[it->second];
}
Type* AddType(const string& name, const ll type_size, const bool base_type) {
types.push_back(Type(name, type_size, base_type));
typeName2Index[name] = types.size() - 1;
return &types.back();
}
const std::string kGlobal = "global";
void Init() {
AddType("byte", 1, true);
AddType("short", 2, true);
AddType("int", 4, true);
AddType("long", 8, true);
AddType(kGlobal, 0, false);
}
void Solver() { //
char define_type_name[300];
char child_type[300];
char child_name[300];
Init();
ll n;
scanf("%lld", &n);
while (n--) {
ll op;
scanf("%lld", &op);
if (op == 1) {
ll k;
scanf("%s%lld", &define_type_name, &k);
myprintf(
"n[%lld] op[1], str[%s] k[%lld] globalName[%s][%p] child[%lld] "
"offset2Index[%lld] childName2Index[%lld]\n",
n, define_type_name, k, GetType(kGlobal)->type_name.c_str(),
GetType(kGlobal), ll(GetType(kGlobal)->childs.size()),
ll(GetType(kGlobal)->offset2Index.size()),
ll(GetType(kGlobal)->childName2Index.size()));
Type* t = AddType(define_type_name, 0, false);
assert(t);
for (ll i = 0; i < k; i++) {
scanf("%s%s", &child_type, &child_name);
const Type* childType = GetType(child_type);
assert(GetType(kGlobal)->type_name.c_str());
assert(childType);
t->AddMember(child_name, childType);
assert(GetType(kGlobal)->type_name.c_str());
}
t->EndMember();
assert(GetType(kGlobal)->type_name.c_str());
myprintf(
"add type[%s] childNum[%lld] offset2Index[%lld] "
"childName2Index[%lld]\n",
t->type_name.c_str(), ll(t->childs.size()),
ll(t->offset2Index.size()), ll(t->childName2Index.size()));
printf("%lld %lld\n", t->type_size, t->align_size);
} else if (op == 2) {
scanf("%s%s", &child_type, &child_name);
myprintf(
"n[%lld] op[2], type[%s] name[%s] globalName[%s][%p] child[%lld] "
"offset2Index[%lld] childName2Index[%lld]\n",
n, child_type, child_name, GetType(kGlobal)->type_name.c_str(),
GetType(kGlobal), ll(GetType(kGlobal)->childs.size()),
ll(GetType(kGlobal)->offset2Index.size()),
ll(GetType(kGlobal)->childName2Index.size()));
const Type* childType = GetType(child_type);
assert(childType);
const Member* member = GetType(kGlobal)->AddMember(child_name, childType);
printf("%lld\n", member->offset);
} else if (op == 3) {
myprintf(
"n[%lld] op[3], globalName[%s][%p] child[%lld] "
"offset2Index[%lld] childName2Index[%lld]\n",
n, GetType(kGlobal)->type_name.c_str(), GetType(kGlobal),
ll(GetType(kGlobal)->childs.size()),
ll(GetType(kGlobal)->offset2Index.size()),
ll(GetType(kGlobal)->childName2Index.size()));
getchar(); // skip space
string name;
const Type* query_type = GetType(kGlobal);
ll query_offset = 0;
while (true) {
const char c = getchar();
if ('a' <= c && c <= 'z') {
name.push_back(c);
} else {
myprintf("step typeName[%s] typeSize[%lld] from[%lld] name[%s]\n",
query_type->type_name.c_str(), query_type->type_size,
query_offset, name.c_str());
const Member* childMember = query_type->GetMember(name);
query_offset += childMember->offset;
myprintf("->to[%lld] childType[%s] ChidName[%s]\n", query_offset,
childMember->type.c_str(), name.c_str());
if (c != '.') {
break;
}
name.clear();
query_type = GetType(childMember->type);
}
}
printf("%lld\n", query_offset);
} else {
ll query_offset = 0;
scanf("%lld", &query_offset);
myprintf(
"n[%lld] op[4], query_offset[%lld] globalName[%s][%p] child[%lld] "
"offset2Index[%lld] childName2Index[%lld]\n",
n, query_offset, GetType(kGlobal)->type_name.c_str(),
GetType(kGlobal), ll(GetType(kGlobal)->childs.size()),
ll(GetType(kGlobal)->offset2Index.size()),
ll(GetType(kGlobal)->childName2Index.size()));
if (query_offset >= GetType(kGlobal)->type_size) {
printf("ERR\n");
continue;
}
const Type* query_type = GetType(kGlobal);
string path;
while (true) { // query_offset 已修正,代表 query_type 的偏移量
auto it = query_type->offset2Index.upper_bound(query_offset);
it--; //
const ll childIndex = it->second; // 如果 offset 很大,则指向最后一个
const Member& member = query_type->childs[childIndex];
const ll child_offset = member.offset;
const std::string& child_name = member.name;
const Type* child_type = GetType(member.type);
assert(child_type);
query_offset -= child_offset;
if (query_offset >= child_type->type_size) { // 在空洞
printf("ERR\n");
break;
}
path.append(child_name);
query_type = child_type;
if (query_type->base_type) {
// if (query_offset != 0) {
// printf("ERR\n"); // 不在起始位置
// break;
// }
printf("%s\n", path.c_str());
break;
}
path.push_back('.');
}
}
}
}
int main() {
InitIO();
Solver();
return 0;
}
/*
5
1 a 2
short aa
int ab
1 b 2
a ba
long bb
2 b x
3 x.ba.ab
4 10
8 4
16 8
0
4
x.bb
*/
Details
Tip: Click on the bar to expand more detailed information
Pretests
Final Tests
Test #1:
score: 5
Accepted
time: 0ms
memory: 3796kb
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: 0ms
memory: 3924kb
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: 3824kb
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: 0ms
memory: 3812kb
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: 4104kb
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: 0ms
memory: 4164kb
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: 4072kb
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: 0ms
memory: 3812kb
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: 2ms
memory: 5076kb
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: 2ms
memory: 4476kb
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: 0ms
memory: 4940kb
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: 2ms
memory: 4676kb
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: 2ms
memory: 4752kb
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: 2ms
memory: 4704kb
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: 4708kb
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: 2ms
memory: 4584kb
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: 2ms
memory: 4588kb
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: 2ms
memory: 4580kb
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: 2ms
memory: 4724kb
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: 4648kb
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