QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#730869#8937. Stage: AgausscrabjimmyywangWA 1ms3832kbC++23678b2024-11-09 22:05:272024-11-09 22:05:28

Judging History

This is the latest submission verdict.

  • [2024-11-09 22:05:28]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3832kb
  • [2024-11-09 22:05:27]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i,a,b) for(ll i=a;i<=b;i++)
ll read(){
    ll x=0,f=1;char c=getchar();
    while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
    while(isdigit(c)){x=x*10+c-'0';c=getchar();}
    return x*f;
}
#define d read()
ll n;
char c[1010][40];
ll a[1010],num[15];
char res[1000010],m;
int main(){
    n=d;f(i,1,n){
        scanf("%s",c[i]+1);
        a[i]=d;num[a[i]]++;
    }f(i,1,n){
        ll t=1;f(j,a[i]+1,10)t+=num[j];
        ll len=strlen(c[i]+1);
        f(j,1,len-t)res[++m]=c[i][j];
    }
    cout<<"Stage: "<<(char)(res[1]-'a'+'A');
    f(i,2,m)cout<<res[i];
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
arcos 2
gausr 5
scrail 3
bei 3

output:

Stage: Agausscrab

result:

ok single line: 'Stage: Agausscrab'

Test #2:

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

input:

4
zhe 1
jiang 3
sheng 5
sai 2

output:

Stage: Jiashen

result:

ok single line: 'Stage: Jiashen'

Test #3:

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

input:

1
yp 1

output:

Stage: Y

result:

ok single line: 'Stage: Y'

Test #4:

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

input:

2
ut 1
fg 1

output:

Stage: Uf

result:

ok single line: 'Stage: Uf'

Test #5:

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

input:

8
pz 1
ym 1
hi 1
mv 1
jh 1
jd 1
ok 1
lc 1

output:

Stage: Pyhmjjol

result:

ok single line: 'Stage: Pyhmjjol'

Test #6:

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

input:

8
cm 2
uk 2
ls 2
ay 1
vr 2
zt 1
al 2
ze 2

output:

Stage: Culvaz

result:

ok single line: 'Stage: Culvaz'

Test #7:

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

input:

8
si 2
vh 2
pb 3
fb 3
uy 1
pa 1
rm 2
no 2

output:

Stage: Pf

result:

ok single line: 'Stage: Pf'

Test #8:

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

input:

8
vs 4
aa 4
tx 1
oe 1
ge 2
il 4
zj 2
cy 1

output:

Stage: Vai

result:

ok single line: 'Stage: Vai'

Test #9:

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

input:

8
hj 5
xu 5
yg 4
tp 3
eo 3
gt 4
hk 2
ua 3

output:

Stage: Hx

result:

ok single line: 'Stage: Hx'

Test #10:

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

input:

8
vh 1
kfa 1
dlq 1
zf 1
qkt 1
ako 1
rds 1
wus 1

output:

Stage: Vkfdlzqkakrdwu

result:

ok single line: 'Stage: Vkfdlzqkakrdwu'

Test #11:

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

input:

8
my 1
hgw 2
nrc 2
gux 2
bjp 1
wme 2
frt 1
ci 1

output:

Stage: Hgnrguwm

result:

ok single line: 'Stage: Hgnrguwm'

Test #12:

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

input:

8
ci 3
ms 1
vw 3
ca 3
nn 3
de 1
fn 1
uq 2

output:

Stage: Cvcn

result:

ok single line: 'Stage: Cvcn'

Test #13:

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

input:

8
oa 4
rt 3
ak 1
hh 3
ita 3
ltp 4
wy 3
tt 3

output:

Stage: Olt

result:

ok single line: 'Stage: Olt'

Test #14:

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

input:

8
nv 1
ki 3
ete 1
gtv 4
dvm 5
kd 5
gay 2
bx 5

output:

Stage: Dvkb

result:

ok single line: 'Stage: Dvkb'

Test #15:

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

input:

8
bpas 1
jfx 1
fpq 1
eiq 1
lj 1
pn 1
bo 1
nj 1

output:

Stage: Bpajffpeilpbn

result:

ok single line: 'Stage: Bpajffpeilpbn'

Test #16:

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

input:

8
rh 1
ur 2
fmf 2
xner 1
dyte 2
qquq 2
mcw 2
kj 1

output:

Stage: Ufmdytqqumc

result:

ok single line: 'Stage: Ufmdytqqumc'

Test #17:

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

input:

8
iqmf 1
jug 3
vheq 2
qol 2
nq 1
fm 2
zh 2
zb 3

output:

Stage: Juvz

result:

ok single line: 'Stage: Juvz'

Test #18:

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

input:

8
um 4
zejz 3
rdi 2
lbai 3
pip 2
yqst 4
xjd 4
gvhu 2

output:

Stage: Uyqsxj

result:

ok single line: 'Stage: Uyqsxj'

Test #19:

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

input:

8
owf 5
bj 2
owm 2
erz 5
wxt 2
zuf 2
zbd 5
lh 3

output:

Stage: Owerzb

result:

ok single line: 'Stage: Owerzb'

Test #20:

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

input:

8
zxp 1
nlid 1
iqqo 1
ly 1
luvc 1
eiub 1
wqzwg 1
zgd 1

output:

Stage: Zxnliiqqlluveiuwqzwzg

result:

ok single line: 'Stage: Zxnliiqqlluveiuwqzwzg'

Test #21:

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

input:

8
bhw 1
khsm 2
uvtv 1
zbae 2
qk 2
weeoj 2
chbrr 1
xj 1

output:

Stage: Khszbaqweeo

result:

ok single line: 'Stage: Khszbaqweeo'

Test #22:

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

input:

8
ndi 3
zlxmi 3
ewcl 1
srcal 2
egfp 3
acog 1
zrvq 3
af 1

output:

Stage: Ndzlxmegfzrv

result:

ok single line: 'Stage: Ndzlxmegfzrv'

Test #23:

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

input:

8
euq 1
al 4
sj 1
hbv 4
ihr 4
yebj 4
nvrmw 3
towa 1

output:

Stage: Ahbihyeb

result:

ok single line: 'Stage: Ahbihyeb'

Test #24:

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

input:

8
uep 4
mlq 2
pbtci 4
vlc 4
px 2
ctrx 5
afsg 4
bj 2

output:

Stage: Upbtvctraf

result:

ok single line: 'Stage: Upbtvctraf'

Test #25:

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

input:

32
fr 1
ay 1
wc 1
ls 1
kp 1
rw 1
lh 1
kj 1
ku 1
oe 1
lh 1
ea 1
py 1
al 1
zj 1
ee 1
gw 1
if 1
sy 1
kz 1
in 1
vl 1
ds 1
la 1
qi 1
ut 1
ub 1
zq 1
bi 1
mu 1
ia 1
kv 1

output:

Stage: Fawlkrlkkolepazegiskivdlquuzbmik

result:

ok single line: 'Stage: Fawlkrlkkolepazegiskivdlquuzbmik'

Test #26:

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

input:

32
vb 2
fa 1
aq 1
mz 1
tz 1
he 2
be 1
yt 1
cc 2
xu 2
qy 1
wa 1
eg 1
qd 2
kg 2
tf 2
tb 1
im 2
ap 1
re 2
qz 2
fl 2
cq 1
yt 2
nc 1
sj 1
ac 1
dd 2
hk 2
rq 1
ne 2
hv 2

output:

Stage: Vhcxqktirqfydhnh

result:

ok single line: 'Stage: Vhcxqktirqfydhnh'

Test #27:

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

input:

32
tw 2
yp 1
fw 1
zy 3
rf 3
xl 2
nj 3
ma 2
np 3
kc 1
uh 1
js 3
wj 1
zv 1
rs 2
uc 1
yu 2
qa 3
wl 2
tx 1
qm 3
tp 3
bw 3
pn 1
si 2
qy 1
ct 1
gv 1
oq 1
dv 2
fv 2
nn 2

output:

Stage: Zrnnjqqtb

result:

ok single line: 'Stage: Zrnnjqqtb'

Test #28:

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

input:

32
gs 3
ci 3
jn 2
bf 1
dq 3
qw 4
wk 3
bc 1
xm 4
on 1
du 2
pj 1
pv 3
pj 1
yh 2
nz 3
mv 2
cp 1
zg 4
wy 1
uo 3
ph 3
lc 2
go 3
xc 2
of 1
eb 3
jq 3
vw 2
ua 3
or 4
lk 3

output:

Stage: Qxzo

result:

ok single line: 'Stage: Qxzo'

Test #29:

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

input:

32
wc 3
dj 3
nb 1
oa 2
bw 4
gm 4
qh 2
pm 4
lz 4
xd 1
hd 1
gb 3
il 3
xb 4
fa 3
pi 5
za 4
oa 4
hf 1
dz 5
qa 4
vc 3
gi 3
xh 1
ze 3
eu 1
fs 3
qe 2
tk 2
ys 2
xn 3
fk 4

output:

Stage: Pd

result:

ok single line: 'Stage: Pd'

Test #30:

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

input:

32
kzm 1
vjv 1
aqa 1
laa 1
ba 1
dlz 1
hz 1
hhj 1
lde 1
vr 1
byb 1
jz 1
br 1
pn 1
cw 1
jkj 1
fk 1
lme 1
yp 1
et 1
xf 1
xo 1
dn 1
nx 1
ze 1
urw 1
vln 1
ju 1
kqp 1
xam 1
jw 1
kbo 1

output:

Stage: Kzvjaqlabdlhhhldvbyjbpcjkflmyexxdnzurvljkqxajkb

result:

ok single line: 'Stage: Kzvjaqlabdlhhhldvbyjbpcjkflmyexxdnzurvljkqxajkb'

Test #31:

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

input:

32
brt 2
kj 2
hky 2
eru 1
bn 1
kpm 1
in 2
nq 1
ayq 1
bs 1
vtb 2
hp 1
mgi 1
jq 1
rq 2
aj 2
zqe 2
me 1
qnx 1
gld 1
li 1
rcl 1
wuh 1
cvu 2
db 2
zaf 1
yo 1
qw 1
fh 1
au 2
er 1
tp 2

output:

Stage: Brkhkivtrazqcvdat

result:

ok single line: 'Stage: Brkhkivtrazqcvdat'

Test #32:

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

input:

32
ni 1
kin 3
vtl 2
lg 3
xrd 2
jj 3
utx 3
byy 3
kdr 2
zz 2
rb 3
rm 3
uvp 3
cnh 2
dy 1
rbm 1
zr 2
geo 2
blu 2
jxx 3
reu 3
ah 3
ov 1
el 2
ui 1
fzw 1
gt 1
kco 1
vwi 3
mm 1
vd 3
rip 3

output:

Stage: Kiljutbyrruvjxreavwvri

result:

ok single line: 'Stage: Kiljutbyrruvjxreavwvri'

Test #33:

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

input:

32
ps 3
lf 2
pa 2
cbs 1
bsm 4
de 2
krh 4
om 2
ao 4
svx 4
oe 2
ggw 1
fy 1
oj 4
im 4
dv 1
uco 2
lha 4
uq 4
gmy 1
ad 1
ebk 3
uxs 1
ayy 1
gb 1
tqh 1
hp 1
pl 1
ie 1
ee 2
ntx 1
kc 2

output:

Stage: Bskrasvoilhu

result:

ok single line: 'Stage: Bskrasvoilhu'

Test #34:

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

input:

32
gk 3
uu 2
tox 3
ezj 4
ruq 4
re 2
nrn 5
wqk 4
lea 5
hg 4
rfv 5
dh 4
vhz 1
hfu 3
vz 4
bst 4
bb 1
zb 5
bt 5
og 2
dsr 5
ba 2
xgw 3
ez 2
id 4
xr 3
bq 1
vh 3
nt 5
va 1
snw 3
dlb 1

output:

Stage: Nrlerfzbdsn

result:

ok single line: 'Stage: Nrlerfzbdsn'

Test #35:

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

input:

32
qh 1
zgtz 1
sbbs 1
chiq 1
tdyu 1
bi 1
kc 1
ivn 1
sm 1
gh 1
ps 1
vlle 1
nmk 1
zdo 1
tte 1
ja 1
nh 1
oicc 1
wvrq 1
zwh 1
rx 1
pup 1
fhzr 1
bscl 1
ksv 1
dlvv 1
sfh 1
afc 1
bcel 1
ei 1
cmv 1
vn 1

output:

Stage: Qzgtsbbchitdybkivsgpvllnmzdttjnoicwvrzwrpufhzbscksdlvsfafbceecmv

result:

ok single line: 'Stage: Qzgtsbbchitdybkivsgpvll...cwvrzwrpufhzbscksdlvsfafbceecmv'

Test #36:

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

input:

32
kzq 1
ht 1
uu 2
vhoo 1
gylk 1
vdap 2
hyd 1
rhzj 2
sxw 2
yit 1
xj 1
pfsy 2
nfn 1
ik 1
vktd 1
vpg 2
gvi 2
pzb 1
ucx 1
qtwv 1
uag 1
iujn 1
wbsh 1
bkl 2
rf 2
uq 1
or 1
mll 2
rzgv 2
mcpq 2
lqw 2
zkbp 1

output:

Stage: Uvdarhzsxpfsvpgvbkrmlrzgmcplq

result:

ok single line: 'Stage: Uvdarhzsxpfsvpgvbkrmlrzgmcplq'

Test #37:

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

input:

32
xj 2
xsx 3
qisu 1
cmyb 1
tkxf 3
fdr 2
iqi 3
swkf 2
kjpd 2
fdbk 1
twy 3
ceve 1
wzsl 3
jop 3
wf 1
qkia 1
zxdq 1
vwz 2
zol 3
ucw 2
pu 1
iuv 1
io 2
bf 2
vq 2
ip 1
qqlo 3
dynk 2
sykc 1
ifsr 3
xhe 3
nmf 3

output:

Stage: Xstkxiqtwwzsjozoqqlifsxhnm

result:

ok single line: 'Stage: Xstkxiqtwwzsjozoqqlifsxhnm'

Test #38:

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

input:

32
naxv 1
ttdz 2
db 1
yisf 4
bwnx 2
nbg 4
yrij 3
ss 2
fbkf 1
nn 2
tnl 4
chd 2
dby 2
ad 1
fb 1
wxhb 3
kds 4
jafx 2
ou 2
qutj 3
zebq 1
hx 4
wphj 3
lqfu 4
rgd 3
ldio 2
emz 4
grgy 1
mgpr 4
vll 1
lju 4
zhv 1

output:

Stage: Yisnbtnkdhlqfemmgplj

result:

ok single line: 'Stage: Yisnbtnkdhlqfemmgplj'

Test #39:

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

input:

32
iwi 2
rtzi 1
ui 2
xxov 2
dwrv 4
bcl 3
hzdu 2
jtss 3
kyzy 5
xo 2
nakc 4
wg 1
od 5
mkkk 3
azh 2
au 3
mcly 1
khl 2
oj 5
ach 4
vg 4
had 1
agoy 1
jiwb 2
on 4
eapt 1
jilb 5
jan 5
lrro 3
ppu 1
vh 1
prs 3

output:

Stage: Kyzoojilja

result:

ok single line: 'Stage: Kyzoojilja'

Test #40:

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

input:

32
aqwtm 1
cx 1
mcriw 1
lrs 1
cuc 1
hgaj 1
dqm 1
txrl 1
ayr 1
am 1
irhpx 1
gxq 1
wc 1
dvwm 1
nckcl 1
cax 1
se 1
xa 1
bhrsr 1
qaeb 1
yluyp 1
bwd 1
muoxh 1
fykm 1
gnc 1
efl 1
dkrbn 1
dnnlt 1
vfjf 1
jr 1
uu 1
frkcp 1

output:

Stage: Aqwtcmcrilrcuhgadqtxrayairhpgxwdvwnckccasxbhrsqaeyluybwmuoxfykgnefdkrbdnnlvfjjufrkc

result:

ok single line: 'Stage: Aqwtcmcrilrcuhgadqtxray...ybwmuoxfykgnefdkrbdnnlvfjjufrkc'

Test #41:

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

input:

32
mheff 1
mx 2
ulqt 1
hc 1
li 2
zx 2
mqwjy 2
vptc 2
smjw 1
zaofz 2
xojl 2
efpf 2
th 2
az 2
tu 1
nl 2
osx 1
rkkm 1
ztc 2
bp 2
nun 1
auo 1
rry 2
cuzdj 1
mad 2
jd 2
elroq 1
ei 1
gkurv 2
qlrzw 1
ldajd 1
kes 1

output:

Stage: Mlzmqwjvptzaofxojefptanztbrrmajgkur

result:

ok single line: 'Stage: Mlzmqwjvptzaofxojefptanztbrrmajgkur'

Test #42:

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

input:

32
drmck 3
rb 2
hrxa 3
njcg 2
stbep 1
hn 2
torbf 1
zcda 3
rohu 3
bmq 1
movf 3
ts 1
pu 1
dzgnb 1
tt 1
xy 1
pue 3
jjyhe 3
sn 2
va 1
ohhgi 1
qua 2
wi 3
etiqr 1
jpy 1
cyd 1
rtwb 2
ldhxb 3
gl 1
mail 3
ldqp 3
bgyjg 3

output:

Stage: Drmchrxzcdrohmovpujjyhwldhxmaildqbgyj

result:

ok single line: 'Stage: Drmchrxzcdrohmovpujjyhwldhxmaildqbgyj'

Test #43:

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

input:

32
tnxso 3
xg 1
pash 2
xa 4
annjc 4
uc 2
hmfh 3
gl 1
by 1
onhpa 3
pnj 3
aas 3
sg 4
tx 1
wd 3
le 1
ex 3
su 1
zagno 1
wd 2
qtl 4
ryiaj 2
nwscp 2
cobr 2
hzi 1
ufb 2
oyff 2
qbqlr 1
ejli 2
xj 2
qca 2
rkqmf 2

output:

Stage: Xannjsqt

result:

ok single line: 'Stage: Xannjsqt'

Test #44:

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

input:

32
jwbip 4
gk 3
xfd 1
qdzbp 4
mrzm 3
mgns 2
tnglq 3
hkx 4
vzjk 4
dnum 2
tpdk 2
ypk 2
zbh 1
xlhy 5
cofi 1
jvmy 1
dus 1
wcjum 3
zn 5
yu 2
qsv 2
vhj 5
rxavl 2
xof 4
auem 5
jwmk 2
ctk 2
iplq 4
etaa 3
kpop 5
xxvn 5
kjt 4

output:

Stage: Xlhzvhauekpoxxv

result:

ok single line: 'Stage: Xlhzvhauekpoxxv'

Test #45:

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

input:

128
lx 1
kd 1
hf 1
qf 1
lv 1
yu 1
xi 1
gt 1
bt 1
pr 1
ab 1
oc 1
jv 1
vv 1
gy 1
gd 1
cn 1
zu 1
qp 1
tg 1
uh 1
tn 1
bw 1
lm 1
ls 1
bg 1
wr 1
fm 1
ot 1
gw 1
zj 1
xg 1
bh 1
eo 1
mf 1
td 1
mm 1
lc 1
ze 1
qx 1
az 1
up 1
cs 1
qt 1
vk 1
sl 1
tf 1
mk 1
yg 1
ll 1
gi 1
qj 1
pi 1
hu 1
ri 1
cq 1
ka 1
uw 1
uq 1
b...

output:

Stage: L

result:

wrong answer 1st lines differ - expected: 'Stage: Lkhqlyxgbpaojvggczqtutb...efzojbpzmbmehdyxfvwimuwxknacauh', found: 'Stage: L'