QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#33465#4006. A=BSuffixTreeAC ✓26ms8256kbPython3341b2022-06-01 19:02:392022-06-01 19:02:40

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 6ms
memory: 8240kb

input:

0

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #2:

score: 0
Accepted
time: 19ms
memory: 8256kb

input:

100

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #3:

score: 0
Accepted
time: 13ms
memory: 8140kb

input:

200

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #4:

score: 0
Accepted
time: 17ms
memory: 8236kb

input:

300

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #5:

score: 0
Accepted
time: 25ms
memory: 8208kb

input:

400

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #6:

score: 0
Accepted
time: 17ms
memory: 8188kb

input:

500

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test 0.

Test #7:

score: 0
Accepted
time: 26ms
memory: 8136kb

input:

795913901

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #8:

score: 0
Accepted
time: 16ms
memory: 8112kb

input:

100985902

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #9:

score: 0
Accepted
time: 15ms
memory: 8236kb

input:

412598703

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #10:

score: 0
Accepted
time: 14ms
memory: 8140kb

input:

220941104

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #11:

score: 0
Accepted
time: 10ms
memory: 8152kb

input:

532553905

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #12:

score: 0
Accepted
time: 16ms
memory: 8108kb

input:

837625906

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #13:

score: 0
Accepted
time: 14ms
memory: 8112kb

input:

149238707

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #14:

score: 0
Accepted
time: 12ms
memory: 8136kb

input:

460851508

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #15:

score: 0
Accepted
time: 10ms
memory: 8136kb

input:

269193909

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #16:

score: 0
Accepted
time: 16ms
memory: 8236kb

input:

203051810

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #17:

score: 0
Accepted
time: 14ms
memory: 8148kb

input:

514664611

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #18:

score: 0
Accepted
time: 15ms
memory: 8144kb

input:

323007012

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #19:

score: 0
Accepted
time: 13ms
memory: 8192kb

input:

131349413

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #20:

score: 0
Accepted
time: 6ms
memory: 8124kb

input:

939691814

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #21:

score: 0
Accepted
time: 4ms
memory: 8140kb

input:

251304615

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.

Test #22:

score: 0
Accepted
time: 7ms
memory: 8148kb

input:

562917416

output:

S=QWP
Pa=DP
Pb=EP
Pc=FP
P=
aQ=QdR
bQ=QeR
cQ=QfR
Q=
dRD=DdT
eRE=EeT
fRF=FfT
dRE=Ed
dRF=Fd
eRD=De
eRF=Fe
fRD=Df
fRE=Ef
TWD=WD
TWE=WE
TWF=WF
TW=WR
Td=dR
Te=eR
Tf=fR
dD=Dd
dE=Ed
dF=Fd
eD=De
eE=Ee
eF=Fe
fD=Df
fE=Ef
fF=Ff
WD=DW
WE=EW
WF=FW
D=
E=
F=
d=
e=
f=
W=
RR=R
R=(return)1
=(return)0

result:

ok Test Passed.