QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#508226#4804. Regular Expressionucup-team1005#AC ✓8ms4244kbC++20659b2024-08-07 10:05:582024-08-07 10:05:59

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3532kb

input:

2
a
ab

output:

1 2
2 6

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 8ms
memory: 4024kb

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: 8ms
memory: 4244kb

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
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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: 5ms
memory: 4016kb

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: 8ms
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
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: 8ms
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 #8:

score: 0
Accepted
time: 8ms
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
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