QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#231579#4804. Regular Expressionucup-team1882#AC ✓5ms4128kbC++231.2kb2023-10-29 14:23:142023-10-29 14:23:15

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
a
ab

output:

1 2
2 6

result:

ok 2 lines

Test #2:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
aa
ab
ac
ad
ae
af
ag
ah
ai
aj
ak
al
am
an
ao
ap
aq
ar
as
at
au
av
aw
ax
ay
az
ba
bb
bc
bd
be
bf
bg
bh
bi
bj
bk
bl
bm
bn
bo
bp
bq
br
bs
bt
bu
bv
bw
bx
by
bz
ca
cb
cc
cd
ce
cf
cg
ch
ci
cj
ck
cl
cm
cn
co
cp
cq
cr
cs
ct
cu
cv
cw
cx
cy
cz
da
db
dc...

output:

1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
...

result:

ok 35857 lines

Test #3:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
aa
ab
ac
ad
ae
af
ag
ah
ai
aj
ak
al
am
an
ao
ap
aq
ar
as
at
au
av
aw
ax
ay
az
ba
bb
bc
bd
be
bf
bg
bh
bi
b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2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
...

result:

ok 35857 lines

Test #5:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
aa
ab
ac
ad
ae
af
ag
ah
ai
aj
ak
al
am
an
ao
ap
aq
ar
as
at
au
av
aw
ax
ay
az
ba
bb
bc
bd
be
bf
bg
bh
bi
bj
bk
bl
bm
bn
bo
bp
bq
br
bs
bt
bu
bv
bw
bx
by
bz
ca
cb
cc
cd
ce
cf
cg
ch
ci
cj
ck
cl
cm
cn
co
cp
cq
cr
cs
ct
cu
cv
cw
cx
cy
cz
da
db
dc...

output:

1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
...

result:

ok 35857 lines

Test #6:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
aa
ab
ac
ad
ae
af
ag
ah
ai
aj
ak
al
am
an
ao
ap
aq
ar
as
at
au
av
aw
ax
ay
az
ba
bb
bc
bd
be
bf
bg
bh
bi
bj
bk
bl
bm
bn
bo
bp
bq
br
bs
bt
bu
bv
bw
bx
by
bz
ca
cb
cc
cd
ce
cf
cg
ch
ci
cj
ck
cl
cm
cn
co
cp
cq
cr
cs
ct
cu
cv
cw
cx
cy
cz
da
db
dc...

output:

1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
...

result:

ok 35857 lines

Test #7:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
aa
ab
ac
ad
ae
af
ag
ah
ai
aj
ak
al
am
an
ao
ap
aq
ar
as
at
au
av
aw
ax
ay
az
ba
bb
bc
bd
be
bf
bg
bh
bi
bj
bk
bl
bm
bn
bo
bp
bq
br
bs
bt
bu
bv
bw
bx
by
bz
ca
cb
cc
cd
ce
cf
cg
ch
ci
cj
ck
cl
cm
cn
co
cp
cq
cr
cs
ct
cu
cv
cw
cx
cy
cz
da
db
dc...

output:

1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 8
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
2 6
...

result:

ok 35857 lines

Test #8:

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

input:

35857
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
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