QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#866177#3899. BSUIR Open XZhaoZiLongAC ✓81ms17604kbPython3297b2025-01-22 13:22:032025-01-22 13:22:03

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 9ms
memory: 8832kb

input:

4
BSUIR
BSU
OPEN
IROPENX

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 11ms
memory: 8832kb

input:

13
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR

output:

42

result:

ok 1 number(s): "42"

Test #3:

score: 0
Accepted
time: 11ms
memory: 8832kb

input:

10
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR

output:

25

result:

ok 1 number(s): "25"

Test #4:

score: 0
Accepted
time: 9ms
memory: 8832kb

input:

10
O
R
T
O
X
H
H
H
N
L

output:

0

result:

ok 1 number(s): "0"

Test #5:

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

input:

10
SBKBERJGUODT
KZOOF
XDKAPSJTKVATUUDV
KVRQJFYYQSNXPDMKMFJRYMHWNDCREMZCTROZD
JZU
YO
HZRSQGX
IRNRVQ
TPQIO
GBKRIQT

output:

0

result:

ok 1 number(s): "0"

Test #6:

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

input:

10
NFDGNIRQVJJFFELILRYDFEKZNLKNQJNPWDUVQJGFQXQT
GZBKMKKIHTMGJIWI
QNQKTMJECAXXVYMKPURXFFYTBEUUMXXABMLPFDEPPZXZAXUVFDTIOXXPHTSQVTUHO
GWXIZLSDVAUBKCCKGVFBIQKBZEOWJP
CTOTD
DNJRNYQM
U
CEPOWTRXDDZZKAGBBVOGSVUPPHVWM
TCYKJSWNBBR
DTSZVWQCGEWYKBJEQWI

output:

0

result:

ok 1 number(s): "0"

Test #7:

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

input:

10
OJJQVEGKYJJWGLXRWNWBXUERRHCKTSENZFFVDAHFVOUUKBYXRJFK
BVSPNPBUVQTTXSPMFFJYIJPPKBXZJCWLNJMUNQCSJPZ
GMUMIVYRETILZSQJRWSXSWPISVSY
YIPLYD
XVMAKVUCJMDGNYYIHRGBLCUDPHSTDDCZZVOTSDYLIXANRIABBZLBOWMSNSXBZCYDQCGR
HTYFDLUSTQTMDMJCJYEGQTZVCGLZTTPMTJNSIHTQAEAADNWQXDNSKWHF
MWDFGRSZEC
V
THYCVPSSI
IQXUCOBULHOLUPW...

output:

0

result:

ok 1 number(s): "0"

Test #8:

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

input:

16
HELLOBSUI
ROPENX
HE
LLO
BSUIROPENX
HELLO
B
SUIRO
PENXHELLOBS
U
IROPENXHELLOBSUIROPE
NXHELLOB
S
U
IROP
ENXHELLOBSUIR

output:

0

result:

ok 1 number(s): "0"

Test #9:

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

input:

32
HELL
OB
SUIR
OP
ENX
HEL
LOBSUIROPE
NXH
E
L
LO
B
SUIRO
P
ENXHE
L
LOB
SUIROPE
NX
HE
LLO
B
SUIR
OP
E
N
XHEL
LOBSUIROPE
N
XHELLO
BSU
IR

output:

0

result:

ok 1 number(s): "0"

Test #10:

score: 0
Accepted
time: 9ms
memory: 8960kb

input:

32
HE
LLO
BSUIROPE
NXHEL
LO
BSU
IROPENXH
ELLO
BSU
IROP
ENXHELLOBSU
IROPE
NXHELLOBSUIR
OPENXHELLOBSUIROP
ENX
H
ELLOBSUIRO
PENX
H
ELLOBSUIROPENXHELLOBSUIROPENXH
ELLOB
SU
IROPENXHELLO
BSUI
ROPE
NX
HEL
LOBSUIROPENXHEL
LOBSUIR
OPENXHEL
L
O

output:

1

result:

ok 1 number(s): "1"

Test #11:

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

input:

50
HEL
L
OBS
U
I
ROPENX
HE
L
LOBSUIR
O
PEN
X
HELLOBSU
IROPENXHELL
OB
SU
I
ROP
EN
XH
E
LLOBSUIROPENXH
E
LLOB
SUIROPEN
X
HELLOBSU
I
ROPENXHE
L
L
OBSU
IROPENXHEL
LOBS
U
IROPE
NX
H
ELLOBSUIROPE
NXHELLOBS
UIROPEN
XHEL
LO
B
SUIRO
PENXHELLO
BSUIROPEN
XHEL
L
O

output:

2

result:

ok 1 number(s): "2"

Test #12:

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

input:

100
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
OP...

output:

2500

result:

ok 1 number(s): "2500"

Test #13:

score: 0
Accepted
time: 11ms
memory: 8832kb

input:

228
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BS...

output:

12996

result:

ok 1 number(s): "12996"

Test #14:

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

input:

322
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BS...

output:

25921

result:

ok 1 number(s): "25921"

Test #15:

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

input:

1000
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
B...

output:

250000

result:

ok 1 number(s): "250000"

Test #16:

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

input:

1000
B
SUIRO
P
E
NX
B
SU
IRO
PEN
X
BS
U
IRO
P
ENX
BS
U
IR
OPE
N
XB
S
UI
R
O
P
EN
X
BSU
I
RO
PE
NX
B
S
UI
R
OPE
N
XB
SU
I
RO
P
E
NX
B
S
UIR
OP
EN
XB
S
U
IR
OP
E
N
X
B
S
UI
R
OPEN
XBS
U
IROP
E
NXBSU
I
RO
PENX
B
S
UI
ROP
ENX
BS
UIROP
ENXBSUI
ROP
ENXBSUI
R
OPE
NX
B
SUIR
O
P
EN
XB
S
U
IR
O
PEN
X
B
SU
I
R...

output:

82

result:

ok 1 number(s): "82"

Test #17:

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

input:

10000
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
...

output:

25000000

result:

ok 1 number(s): "25000000"

Test #18:

score: 0
Accepted
time: 53ms
memory: 12416kb

input:

65536
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
BSUIR
...

output:

1073741824

result:

ok 1 number(s): "1073741824"

Test #19:

score: 0
Accepted
time: 66ms
memory: 13824kb

input:

92681
BSUIR
OPENX
OPENX
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
...

output:

2147441940

result:

ok 1 number(s): "2147441940"

Test #20:

score: 0
Accepted
time: 65ms
memory: 14080kb

input:

92682
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
OPENX
...

output:

2147488281

result:

ok 1 number(s): "2147488281"

Test #21:

score: 0
Accepted
time: 76ms
memory: 14336kb

input:

100000
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
OPENX
BSUIR
BSUIR
OPENX
OPENX
BSUIR
OPENX
OPENX
OPENX
OPENX
BSUIR
OPENX
BSUIR
BSUIR
BSUIR
OPENX
BSUIR
OPENX
OPENX
BSUIR
OPENX
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX
OPENX
OPENX
BSUIR
BSUIR
BSUIR
BSUIR
OPENX...

output:

2500000000

result:

ok 1 number(s): "2500000000"

Test #22:

score: 0
Accepted
time: 81ms
memory: 17604kb

input:

100000
NPPENPNXNSRXPP
IBESEENSONURP
X
IORXUESSXIO
PIIRSUXNOXU
BXERO
USXBBPSREPBNI
XUBUBISOSUIOPXUOPB
BIEPIS
SSXIRPBUUNOPPOS
BOEOUXOSP
XR
X
ROIEUPISPEEBRRXEXIRBO
UNPPEIPPRRRPNBEROUN
INBIORNB
OPREIXRUIOXNOORRIPUIPXNBNBEII
OOXSRPNSBOOBRUXBENOOUBXOPNI
SOUR
BPRIISBPX
N
R
BEXPEPRBU
URR
XNSBIIP
PSBPOUUB
XU...

output:

0

result:

ok 1 number(s): "0"

Test #23:

score: 0
Accepted
time: 79ms
memory: 12544kb

input:

100000
U
S
PP
XO
IX
B
SP
RN
SXI
E
E
P
XBXUSSO
RI
BB
S
X
SSPX
R
NXIBB
N
XRSS
O
R
BIX
P
PSIE
U
NE
XP
I
X
RU
O
E
B
S
PXOPX
X
RURRB
NXR
NUXPN
RRO
X
B
P
R
E
BEP
EN
RS
OS
R
XUBBB
XOP
S
X
XUO
U
U
UEX
B
ES
U
RPPIU
UX
SI
O
ENPB
XN
OBORBIB
B
NRO
PP
B
O
NR
N
OBNBI
N
X
I
IIIU
UE
U
IE
RBOXN
X
S
I
X
R
X
PPBR
N
OX...

output:

0

result:

ok 1 number(s): "0"

Test #24:

score: 0
Accepted
time: 78ms
memory: 13824kb

input:

100000
BSUIR
OPENXBSUIROP
ENXBSU
IROPENXBS
UI
R
O
PENXBS
UIROPENXBSUIROPENXBSUIR
OPEN
XBSUIROPE
NXBSUIROPE
NXBSUIRO
PEN
X
BSUIR
O
PENXBSUIROPE
NXBS
UIROPENX
BSUIR
OPENX
B
SUI
RO
PEN
XBSUIROP
ENXBSUIROPENXBSUI
ROPENXBSUIRO
PENXBSUIROPENXBSUIROP
ENXBSUIROPEN
XBS
U
I
ROPENXBSU
IROPE
NX
BSU
IROP
ENXBS
U...

output:

6070126

result:

ok 1 number(s): "6070126"

Test #25:

score: 0
Accepted
time: 65ms
memory: 12032kb

input:

100000
BSUI
R
O
P
E
NXBS
U
IR
OPE
N
XB
SU
IRO
PE
N
XB
SU
IR
OPEN
XBS
UI
R
OP
E
N
X
BS
U
IRO
P
E
N
X
BSUI
RO
PE
NX
BSUIRO
P
E
NXBSU
IROPENX
B
S
UI
R
O
P
E
NXB
S
UI
R
O
PE
NXB
S
U
IRO
P
EN
X
B
S
UIR
O
P
EN
XBSU
I
R
OP
ENXBS
U
I
R
OP
E
N
XB
S
UI
R
O
P
E
N
X
B
S
UIR
OP
EN
X
BSU
IR
OPE
NX
B
SU
IRO
PEN
XB...

output:

855631

result:

ok 1 number(s): "855631"

Test #26:

score: 0
Accepted
time: 75ms
memory: 12416kb

input:

100000
BS
UIR
OPENXBSUIR
OPE
NXBS
U
IROP
ENX
BS
UIR
O
PE
N
X
BS
UIROPEN
XBS
U
IR
O
PEN
XBS
U
IR
OP
EN
XB
SUI
R
O
PEN
XB
SUI
RO
PE
NXB
SU
IRO
PENXBSUIRO
P
E
NX
BSU
I
ROP
ENX
BSU
IRO
PE
NX
B
SUIR
OP
EN
XB
S
U
I
R
O
P
E
NX
BSU
IROPEN
X
BS
UI
R
O
PE
NX
BS
UIROP
EN
X
BS
U
IROPE
N
X
B
SUIROP
ENX
B
SUI
R
O...

output:

2379412

result:

ok 1 number(s): "2379412"

Test #27:

score: 0
Accepted
time: 73ms
memory: 12544kb

input:

99999
BS
U
IROPE
N
XBSUIROP
ENX
B
S
UIRO
PENX
BS
U
IR
O
PE
NXBSU
I
R
O
PENX
BSUIROP
E
N
XBS
UIROP
ENXBSUI
RO
PENX
BSU
IRO
PE
NX
B
SUIR
O
PENXBS
UIROP
E
N
XB
SUI
RO
PEN
XBS
U
I
R
OPENX
BS
U
I
R
OPENXBSU
I
RO
PEN
XB
SUIR
O
PENXBS
U
I
R
OP
ENXBSUIR
OP
ENX
BS
UIRO
P
EN
XB
S
UIROP
E
NXBSUIR
O
PENXB
SUI
R...

output:

2447516

result:

ok 1 number(s): "2447516"

Test #28:

score: 0
Accepted
time: 79ms
memory: 12544kb

input:

99991
R
O
P
ENXBSUIRO
PE
NXB
SUI
RO
PENX
BS
U
I
RO
PE
NX
B
SU
I
R
OPENX
BS
UIROPE
NX
BSU
IROPE
NX
B
SUIROP
E
N
XBS
U
IR
OP
ENXB
SUI
R
OPE
N
X
B
SUI
R
O
PE
N
XB
S
UIRO
PENX
BS
UIR
OP
E
N
XBSUI
ROPE
NXBS
UI
RO
P
ENXBSU
I
R
OP
E
NXB
SUI
ROPENXB
S
U
I
ROPENXB
S
U
IR
O
P
EN
XB
SU
IROPE
NXB
SU
I
ROPEN
XBS...

output:

2380006

result:

ok 1 number(s): "2380006"

Test #29:

score: 0
Accepted
time: 40ms
memory: 11392kb

input:

54678
OPEN
XBSUIROPE
N
XBS
UIRO
PEN
XBSU
IROPEN
XBSUIROP
ENXBSUIROPENXBS
U
IROPE
NX
B
S
UIRO
PENXBS
UIROP
ENXBSU
IROP
ENXB
S
UI
ROPENX
BSU
IROPENXBSUI
ROPENXBSUI
ROPE
NXBSUI
ROPEN
XB
S
UIROPENXBSUIR
OPENX
B
SUIROPENXBSUI
ROPENXBS
UIROPE
NX
B
SUIROPENXBSUIR
OPE
N
XBSUIROP
ENXBS
UIROPE
NXBSUIRO
PENXBS...

output:

1794329

result:

ok 1 number(s): "1794329"

Test #30:

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

input:

2
HKBUHXKTIYWQJAOJBWHOEJTVNEUSZNPRSZYLORKMIEONQIJMISECMWIWGAFWSDSUUIUQOIVMAVLETTVLZUEWMLOZCWSQZWDFUMJTOCSNNWPSOPSDZOROWIAGMXUMUYYKXWETGVCEGJFIKWIVGJMIGBANFIDOZNIGYKBRQLXXPTJAWSHLDEDOFGCCBEDRMSGBDBYDPGWIOWKWLOKLLDUKRHWIDEHMSXZIVSNPRSVJSXWWPGZKGWUZOGYCWXBLBXGSPSKYFTDWAWWDWDZXDCUBXHXDKFPUFOBBXDIWBDMJFD...

output:

0

result:

ok 1 number(s): "0"

Test #31:

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

input:

5
NTTSYNVGBXUBOKLLASTATVCQKRRZEYLNVHWXCABFZGPLFYAOZXVRTRJWUQYOUECRIBROGJRJFVMYMSEFZQJMSVLDKUECNFFMXCNMZCQMCMWWOPDYUXFYEVASPYFVNXZJIBNFIXBJEGDXUHECAVSWOTPLBPZJZDIJKILGWRQEGHTBXDVLAHVWQXFMLERBBHWRNMKSYKHTUOVKWMXFUYAXBACAVIIWWFPIBTRMBGDBRYWTKQNUBTCOAACLZFIEEDZFYZUAKJZQXPBZBBXQNRMDYXLNGUBSEFPRADJENBIEHQ...

output:

0

result:

ok 1 number(s): "0"

Test #32:

score: 0
Accepted
time: 11ms
memory: 10472kb

input:

8
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

output:

0

result:

ok 1 number(s): "0"

Test #33:

score: 0
Accepted
time: 9ms
memory: 10504kb

input:

2
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

0

result:

ok 1 number(s): "0"

Test #34:

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

input:

1
VYODMAYYCSNVQPRASPKCJGIEVJWIGJQTYFAQSOFYLNEOKVEBUHPPSQPEUVAIZUFCWAEARQFEHWCGDUBWHELAIZXQSHPONUBUJHPVBAKVJPTKWYXMAVDTCWATKGPYFHYSSUJYOBUTPTNMOTCCIPTTCXSXYOVQJSQNLLYDPJRWTEFANOAUULXLJTZPRVGXZEJVZONGWGBNEGYRAHYOZNUGGMKUPFWJFBIJUBCYFEKDLWGNZMLPIOZMTAQIVNZGCMJWNHPXKHVHRILWNEPQKGEIOUKKLPLCGBYLOEBDWOEMVX...

output:

0

result:

ok 1 number(s): "0"

Test #35:

score: 0
Accepted
time: 9ms
memory: 8832kb

input:

1
A

output:

0

result:

ok 1 number(s): "0"

Test #36:

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

input:

1
BSUIROPENX

output:

0

result:

ok 1 number(s): "0"

Test #37:

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

input:

2
BSUIROPEN
X

output:

1

result:

ok 1 number(s): "1"

Test #38:

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

input:

2
X
BSUIROPEN

output:

1

result:

ok 1 number(s): "1"

Test #39:

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

input:

2
B
SUIROPENX

output:

1

result:

ok 1 number(s): "1"

Test #40:

score: 0
Accepted
time: 11ms
memory: 8960kb

input:

2
UIROPENX
B

output:

0

result:

ok 1 number(s): "0"