QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#59493#3480. Bus PlanningLHAC ✓603ms46796kbJava111.7kb2022-10-29 17:13:512022-10-29 17:13:54

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 350ms
memory: 41416kb

input:

2 0 1
Alice
Bob

output:

2
Bob
Alice

result:

ok good job

Test #2:

score: 0
Accepted
time: 285ms
memory: 41756kb

input:

3 2 3
Alice
Charlie
Bob
Alice Charlie
Bob Charlie

output:

2
Alice Bob
Charlie

result:

ok good job

Test #3:

score: 0
Accepted
time: 433ms
memory: 42380kb

input:

15 84 5
rd
L
oVuNAFbtDS
acxlpaVp
h
O
eUw
J
NqOxb
N
Na
UNvIvYeHrL
fajLGg
SFpwqtOjT
jZleGbGUae
NqOxb acxlpaVp
N SFpwqtOjT
O NqOxb
J acxlpaVp
O UNvIvYeHrL
rd NqOxb
UNvIvYeHrL J
rd oVuNAFbtDS
SFpwqtOjT L
rd N
N J
N L
Na oVuNAFbtDS
fajLGg Na
O eUw
N oVuNAFbtDS
eUw N
O acxlpaVp
Na O
acxlpaVp SFpwqtOjT
faj...

output:

8
L fajLGg jZleGbGUae
rd SFpwqtOjT
oVuNAFbtDS acxlpaVp UNvIvYeHrL
Na
N
NqOxb
O J
h eUw

result:

ok good job

Test #4:

score: 0
Accepted
time: 406ms
memory: 42376kb

input:

14 7 2
AwIxYM
qVX
fPvX
Wfcqnm
zQyJN
F
ctMM
C
RgwZr
CzHkIc
dghctwRGw
bfuS
UDxI
mBdpYZogN
bfuS Wfcqnm
qVX ctMM
dghctwRGw bfuS
qVX RgwZr
Wfcqnm RgwZr
mBdpYZogN dghctwRGw
mBdpYZogN bfuS

output:

7
UDxI mBdpYZogN
CzHkIc bfuS
RgwZr dghctwRGw
ctMM C
zQyJN F
fPvX Wfcqnm
AwIxYM qVX

result:

ok good job

Test #5:

score: 0
Accepted
time: 276ms
memory: 41988kb

input:

10 4 4
QqgswRvFWf
hCy
DLvMJXUvwd
K
RhGrH
DUqEX
N
QeZUSrB
fzccMCuzk
nktqpNyL
DLvMJXUvwd K
K QqgswRvFWf
N K
hCy QqgswRvFWf

output:

3
N QeZUSrB fzccMCuzk nktqpNyL
hCy K RhGrH DUqEX
QqgswRvFWf DLvMJXUvwd

result:

ok good job

Test #6:

score: 0
Accepted
time: 246ms
memory: 41560kb

input:

6 9 1
YgFAc
ZhRC
nAjCur
xfyeTw
PnSQxDP
GHrgQ
ZhRC xfyeTw
PnSQxDP ZhRC
GHrgQ YgFAc
nAjCur PnSQxDP
xfyeTw YgFAc
xfyeTw GHrgQ
YgFAc PnSQxDP
GHrgQ ZhRC
nAjCur xfyeTw

output:

6
GHrgQ
PnSQxDP
xfyeTw
nAjCur
ZhRC
YgFAc

result:

ok good job

Test #7:

score: 0
Accepted
time: 352ms
memory: 42576kb

input:

14 55 14
DLCN
eJ
Iy
WEzfI
qzKZIBIsLL
MPBkRbl
obFeTG
rjl
MGmzg
wlReL
PFGViZhlSN
ArGYYiTb
HyJxp
CilYUlmP
WEzfI wlReL
MGmzg rjl
DLCN MGmzg
wlReL Iy
WEzfI qzKZIBIsLL
wlReL MGmzg
PFGViZhlSN WEzfI
ArGYYiTb DLCN
MPBkRbl Iy
qzKZIBIsLL rjl
qzKZIBIsLL ArGYYiTb
PFGViZhlSN MPBkRbl
obFeTG WEzfI
ArGYYiTb MPBkRbl
...

output:

5
wlReL ArGYYiTb CilYUlmP
DLCN rjl PFGViZhlSN HyJxp
Iy WEzfI MGmzg
MPBkRbl obFeTG
eJ qzKZIBIsLL

result:

ok good job

Test #8:

score: 0
Accepted
time: 363ms
memory: 42412kb

input:

15 83 15
yCvR
DTBHavwiyP
vfTIyrV
eNxxqIy
zJ
eFh
XvHCOm
U
SiRYXQPUa
Hi
YJBzAPCCU
liSHKWPW
cd
SHYcU
CI
eNxxqIy SHYcU
CI zJ
liSHKWPW YJBzAPCCU
CI yCvR
cd zJ
SiRYXQPUa liSHKWPW
DTBHavwiyP vfTIyrV
YJBzAPCCU eNxxqIy
zJ U
YJBzAPCCU eFh
DTBHavwiyP eFh
SHYcU liSHKWPW
SiRYXQPUa yCvR
Hi zJ
SHYcU yCvR
SiRYXQPUa...

output:

8
eFh SiRYXQPUa CI
zJ SHYcU
yCvR cd
XvHCOm Hi liSHKWPW
YJBzAPCCU
U
vfTIyrV eNxxqIy
DTBHavwiyP

result:

ok good job

Test #9:

score: 0
Accepted
time: 327ms
memory: 41648kb

input:

7 10 4
xwr
BA
SBwagKrLf
diVHu
tRmF
lWP
NXWJWq
tRmF SBwagKrLf
lWP SBwagKrLf
BA SBwagKrLf
xwr NXWJWq
xwr SBwagKrLf
NXWJWq SBwagKrLf
diVHu SBwagKrLf
tRmF BA
tRmF xwr
NXWJWq lWP

output:

3
diVHu tRmF NXWJWq
xwr BA lWP
SBwagKrLf

result:

ok good job

Test #10:

score: 0
Accepted
time: 367ms
memory: 42340kb

input:

11 1 3
lkkySsZw
ScT
Zy
IKcz
W
QYX
pGmV
U
eWtRAn
pthE
GWdyw
lkkySsZw IKcz

output:

4
eWtRAn pthE GWdyw
QYX pGmV U
Zy IKcz W
lkkySsZw ScT

result:

ok good job

Test #11:

score: 0
Accepted
time: 308ms
memory: 42136kb

input:

4 5 3
VTtxnjZw
LXXOAbJ
xCzmg
hsRjbngU
LXXOAbJ xCzmg
LXXOAbJ hsRjbngU
hsRjbngU xCzmg
xCzmg VTtxnjZw
VTtxnjZw hsRjbngU

output:

3
hsRjbngU
xCzmg
VTtxnjZw LXXOAbJ

result:

ok good job

Test #12:

score: 0
Accepted
time: 329ms
memory: 41832kb

input:

12 44 7
BuunkLOo
jVPFEAp
JmWRbz
PZMgBTRJfr
xCrTUipMRm
TcgSWWZZga
aMADkhqQf
c
bDLIZ
lYC
QMG
O
BuunkLOo lYC
aMADkhqQf jVPFEAp
PZMgBTRJfr bDLIZ
BuunkLOo QMG
TcgSWWZZga aMADkhqQf
TcgSWWZZga jVPFEAp
lYC O
JmWRbz xCrTUipMRm
BuunkLOo PZMgBTRJfr
bDLIZ jVPFEAp
lYC QMG
QMG jVPFEAp
lYC c
lYC xCrTUipMRm
JmWRbz ...

output:

5
BuunkLOo bDLIZ O
PZMgBTRJfr QMG
JmWRbz aMADkhqQf lYC
TcgSWWZZga c
jVPFEAp xCrTUipMRm

result:

ok good job

Test #13:

score: 0
Accepted
time: 350ms
memory: 41948kb

input:

11 26 4
I
dShv
Yst
wS
yzCU
JGFWx
FDGXKuxD
aTCORkpY
zkoweFW
LU
jZJnoOWn
dShv LU
zkoweFW aTCORkpY
FDGXKuxD LU
LU Yst
dShv jZJnoOWn
FDGXKuxD yzCU
I aTCORkpY
aTCORkpY JGFWx
wS Yst
zkoweFW I
jZJnoOWn LU
aTCORkpY LU
aTCORkpY yzCU
I Yst
wS FDGXKuxD
I jZJnoOWn
wS zkoweFW
yzCU zkoweFW
jZJnoOWn Yst
JGFWx zkow...

output:

4
FDGXKuxD zkoweFW jZJnoOWn
I wS JGFWx LU
dShv aTCORkpY
Yst yzCU

result:

ok good job

Test #14:

score: 0
Accepted
time: 327ms
memory: 42180kb

input:

12 18 6
ZyjbKni
xbzaikA
WacCymac
Q
Rb
dulCTlcF
VbEOyUjfA
sRPu
bZ
D
aEpaexTZYa
ulA
ulA Q
Q D
D dulCTlcF
bZ D
D ulA
Q WacCymac
sRPu Q
VbEOyUjfA bZ
bZ dulCTlcF
dulCTlcF xbzaikA
aEpaexTZYa xbzaikA
bZ ulA
VbEOyUjfA aEpaexTZYa
D VbEOyUjfA
aEpaexTZYa bZ
ZyjbKni xbzaikA
WacCymac bZ
ZyjbKni Q

output:

3
WacCymac Rb dulCTlcF VbEOyUjfA sRPu ulA
ZyjbKni D aEpaexTZYa
xbzaikA Q bZ

result:

ok good job

Test #15:

score: 0
Accepted
time: 409ms
memory: 42408kb

input:

13 16 10
xWDR
tBKodmBm
xMp
LES
MIMfrzl
XYrxHC
vlFYJgq
DqvkwSWp
V
ddtCbNzG
STFaOxQ
annUbS
aJoyAye
V MIMfrzl
ddtCbNzG V
XYrxHC aJoyAye
aJoyAye DqvkwSWp
V xWDR
aJoyAye xMp
tBKodmBm xMp
annUbS ddtCbNzG
vlFYJgq STFaOxQ
annUbS DqvkwSWp
V vlFYJgq
V aJoyAye
vlFYJgq XYrxHC
tBKodmBm vlFYJgq
MIMfrzl DqvkwSWp
a...

output:

3
xWDR LES MIMfrzl STFaOxQ annUbS aJoyAye
xMp vlFYJgq DqvkwSWp ddtCbNzG
tBKodmBm XYrxHC V

result:

ok good job

Test #16:

score: 0
Accepted
time: 381ms
memory: 42548kb

input:

15 51 5
mxNRL
Zd
ZlOYUcRCB
qqKK
NAJalvPbxO
mcxnyVN
ZnjuiIChl
pBFQgNHIGP
OLnasOS
vAQXNT
keVRjjJUSy
BKvG
GbdbIPQqF
DCnFoAT
gmFUoWAPG
OLnasOS Zd
OLnasOS DCnFoAT
OLnasOS pBFQgNHIGP
OLnasOS qqKK
keVRjjJUSy gmFUoWAPG
pBFQgNHIGP mxNRL
mcxnyVN gmFUoWAPG
GbdbIPQqF BKvG
keVRjjJUSy BKvG
qqKK NAJalvPbxO
keVRjjJ...

output:

5
ZnjuiIChl vAQXNT gmFUoWAPG
mxNRL NAJalvPbxO GbdbIPQqF DCnFoAT
Zd BKvG
qqKK mcxnyVN pBFQgNHIGP keVRjjJUSy
ZlOYUcRCB OLnasOS

result:

ok good job

Test #17:

score: 0
Accepted
time: 277ms
memory: 41496kb

input:

3 2 3
IyyMqzBhmJ
oQMgBXGiI
c
oQMgBXGiI IyyMqzBhmJ
c IyyMqzBhmJ

output:

2
oQMgBXGiI c
IyyMqzBhmJ

result:

ok good job

Test #18:

score: 0
Accepted
time: 287ms
memory: 41508kb

input:

9 19 2
urXBbpCbMk
VJeCmq
vjMlB
ChGIiAIJ
ZBlVZaYd
UGHYGMGqH
U
uzS
pxlb
U ChGIiAIJ
U vjMlB
ChGIiAIJ VJeCmq
uzS pxlb
vjMlB ZBlVZaYd
urXBbpCbMk pxlb
UGHYGMGqH pxlb
vjMlB VJeCmq
vjMlB UGHYGMGqH
vjMlB uzS
pxlb U
ChGIiAIJ pxlb
ChGIiAIJ uzS
U urXBbpCbMk
VJeCmq pxlb
vjMlB pxlb
urXBbpCbMk ZBlVZaYd
VJeCmq U
uz...

output:

5
ZBlVZaYd pxlb
U uzS
ChGIiAIJ UGHYGMGqH
urXBbpCbMk vjMlB
VJeCmq

result:

ok good job

Test #19:

score: 0
Accepted
time: 330ms
memory: 41872kb

input:

8 9 2
yH
WfeuOwlyUL
VSjx
hE
KwM
Ckxjrfn
fNUdfHKAy
aSrEy
hE yH
yH WfeuOwlyUL
fNUdfHKAy hE
fNUdfHKAy KwM
hE KwM
Ckxjrfn VSjx
VSjx fNUdfHKAy
Ckxjrfn KwM
yH VSjx

output:

4
fNUdfHKAy aSrEy
hE Ckxjrfn
yH KwM
WfeuOwlyUL VSjx

result:

ok good job

Test #20:

score: 0
Accepted
time: 328ms
memory: 42156kb

input:

10 24 4
IaNnRuQ
bwoOmB
OAqpUqqT
hsAFdIaXl
pHrynQYdbl
eYmQ
SIbA
Na
cWOXlglix
HEdQxqsKjx
Na OAqpUqqT
Na cWOXlglix
cWOXlglix IaNnRuQ
hsAFdIaXl bwoOmB
HEdQxqsKjx OAqpUqqT
OAqpUqqT SIbA
hsAFdIaXl IaNnRuQ
eYmQ pHrynQYdbl
IaNnRuQ HEdQxqsKjx
hsAFdIaXl cWOXlglix
eYmQ cWOXlglix
OAqpUqqT bwoOmB
IaNnRuQ SIbA
pH...

output:

4
bwoOmB cWOXlglix HEdQxqsKjx
hsAFdIaXl eYmQ Na
pHrynQYdbl SIbA
IaNnRuQ OAqpUqqT

result:

ok good job

Test #21:

score: 0
Accepted
time: 298ms
memory: 41744kb

input:

5 2 2
kiP
SLkru
pdFbWpieD
JX
HcI
pdFbWpieD SLkru
pdFbWpieD kiP

output:

3
JX HcI
pdFbWpieD
kiP SLkru

result:

ok good job

Test #22:

score: 0
Accepted
time: 400ms
memory: 42260kb

input:

13 3 3
DZaMXMRGV
KoaugGc
HfTwy
EpvK
KVOh
rFCVZHW
Nd
oPmkx
ROgPRyt
GS
jvBRKSYUyX
vBLKGqNY
jLm
jLm vBLKGqNY
ROgPRyt rFCVZHW
vBLKGqNY GS

output:

5
GS jvBRKSYUyX jLm
oPmkx ROgPRyt vBLKGqNY
KVOh rFCVZHW Nd
KoaugGc HfTwy EpvK
DZaMXMRGV

result:

ok good job

Test #23:

score: 0
Accepted
time: 307ms
memory: 41460kb

input:

9 26 2
bgC
EY
MnOr
nmH
aWH
jVuJixC
hj
wk
lxeEOxfUG
hj bgC
bgC lxeEOxfUG
lxeEOxfUG MnOr
lxeEOxfUG EY
nmH aWH
EY nmH
hj EY
nmH bgC
nmH jVuJixC
aWH hj
hj lxeEOxfUG
aWH wk
MnOr EY
nmH lxeEOxfUG
jVuJixC bgC
wk hj
MnOr jVuJixC
wk nmH
wk lxeEOxfUG
bgC EY
wk bgC
MnOr bgC
MnOr wk
hj nmH
jVuJixC EY
MnOr hj

output:

5
jVuJixC lxeEOxfUG
EY wk
hj
bgC aWH
MnOr nmH

result:

ok good job

Test #24:

score: 0
Accepted
time: 304ms
memory: 42348kb

input:

12 25 12
DgzEqbJc
Dd
Wifut
ZIOt
GKqPSIi
P
Byh
MzQORoq
VNXwnq
z
MjKjFvEkZ
X
MjKjFvEkZ z
Dd GKqPSIi
Dd ZIOt
VNXwnq DgzEqbJc
GKqPSIi MjKjFvEkZ
Dd VNXwnq
Byh MjKjFvEkZ
Wifut MjKjFvEkZ
DgzEqbJc Dd
Dd P
MzQORoq z
ZIOt z
X GKqPSIi
DgzEqbJc Wifut
MjKjFvEkZ ZIOt
DgzEqbJc Byh
MzQORoq GKqPSIi
Dd Byh
VNXwnq z
P...

output:

4
DgzEqbJc P MzQORoq MjKjFvEkZ X
GKqPSIi Byh z
Wifut ZIOt VNXwnq
Dd

result:

ok good job

Test #25:

score: 0
Accepted
time: 383ms
memory: 42448kb

input:

15 96 15
pIl
UXwnqdl
WqFjEK
WEbr
eKvliwjCIs
FXJnzE
GuyecXgO
oVTNhqfUF
J
LkQiWal
AgwwTLJg
oBf
BEUUfJBH
uhmyr
wKV
BEUUfJBH J
LkQiWal UXwnqdl
GuyecXgO eKvliwjCIs
LkQiWal J
GuyecXgO WEbr
BEUUfJBH LkQiWal
J WEbr
oBf pIl
WqFjEK LkQiWal
WqFjEK AgwwTLJg
BEUUfJBH oBf
WqFjEK WEbr
uhmyr UXwnqdl
WqFjEK eKvliwjC...

output:

10
wKV
AgwwTLJg uhmyr
UXwnqdl BEUUfJBH
J oBf
oVTNhqfUF LkQiWal
GuyecXgO
eKvliwjCIs FXJnzE
WEbr
WqFjEK
pIl

result:

ok good job

Test #26:

score: 0
Accepted
time: 394ms
memory: 42464kb

input:

7 1 2
uZumkSHXQ
hAZtxpKlu
kZsL
eoVyxIjIXF
dTGO
gS
pmLWq
hAZtxpKlu gS

output:

4
gS pmLWq
eoVyxIjIXF dTGO
hAZtxpKlu kZsL
uZumkSHXQ

result:

ok good job

Test #27:

score: 0
Accepted
time: 339ms
memory: 42484kb

input:

14 83 5
c
kJyKSpfRu
kK
ykuKiHl
DU
FtLKdb
lApBQYRK
tIsfgOMx
NCwcbXG
ZtqWkI
Fcajy
BqOysKugtf
VOMUmO
HdC
BqOysKugtf VOMUmO
c ykuKiHl
lApBQYRK FtLKdb
c lApBQYRK
Fcajy ykuKiHl
VOMUmO DU
BqOysKugtf Fcajy
HdC ykuKiHl
ZtqWkI BqOysKugtf
FtLKdb BqOysKugtf
c ZtqWkI
Fcajy HdC
ykuKiHl ZtqWkI
kK HdC
NCwcbXG kK
Zt...

output:

11
kJyKSpfRu NCwcbXG HdC
VOMUmO
BqOysKugtf
Fcajy
ZtqWkI
lApBQYRK tIsfgOMx
FtLKdb
DU
ykuKiHl
kK
c

result:

ok good job

Test #28:

score: 0
Accepted
time: 284ms
memory: 41564kb

input:

9 12 3
ZO
eZxEYEGSlQ
WP
OVd
EOMBUxAKPU
JifWiODDU
CoRcBXiKk
uVrDwPZD
dJg
WP dJg
uVrDwPZD OVd
CoRcBXiKk EOMBUxAKPU
dJg eZxEYEGSlQ
WP eZxEYEGSlQ
dJg EOMBUxAKPU
CoRcBXiKk eZxEYEGSlQ
EOMBUxAKPU ZO
eZxEYEGSlQ OVd
uVrDwPZD WP
JifWiODDU uVrDwPZD
uVrDwPZD EOMBUxAKPU

output:

3
CoRcBXiKk uVrDwPZD dJg
eZxEYEGSlQ EOMBUxAKPU JifWiODDU
ZO WP OVd

result:

ok good job

Test #29:

score: 0
Accepted
time: 303ms
memory: 41704kb

input:

4 3 4
anSdJjgV
qCAeDcxg
FmNFf
ANUEav
qCAeDcxg ANUEav
anSdJjgV qCAeDcxg
ANUEav FmNFf

output:

2
anSdJjgV ANUEav
qCAeDcxg FmNFf

result:

ok good job

Test #30:

score: 0
Accepted
time: 330ms
memory: 41536kb

input:

7 10 5
Fbeka
Jlyxzvo
Mf
KOtssNDk
hkDgoeB
rOzCKXPRoM
ML
Fbeka rOzCKXPRoM
ML Mf
Jlyxzvo Fbeka
Jlyxzvo rOzCKXPRoM
hkDgoeB Fbeka
Jlyxzvo KOtssNDk
Fbeka Mf
Jlyxzvo Mf
Fbeka KOtssNDk
Jlyxzvo ML

output:

3
Fbeka ML
Mf KOtssNDk hkDgoeB rOzCKXPRoM
Jlyxzvo

result:

ok good job

Test #31:

score: 0
Accepted
time: 307ms
memory: 42404kb

input:

13 74 5
eGskaf
XGTMaIjTtm
ohs
XwzmntzM
HYHuCV
yMsbieChr
m
T
QuQ
n
fJRsEeRt
qwqgKRId
QlhiLHeYjw
XGTMaIjTtm m
ohs qwqgKRId
QuQ m
n yMsbieChr
QuQ XGTMaIjTtm
qwqgKRId T
yMsbieChr ohs
yMsbieChr QuQ
QlhiLHeYjw T
ohs XGTMaIjTtm
ohs QlhiLHeYjw
XGTMaIjTtm QlhiLHeYjw
fJRsEeRt ohs
yMsbieChr QlhiLHeYjw
XwzmntzM...

output:

11
qwqgKRId QlhiLHeYjw
T fJRsEeRt
n
QuQ
m
yMsbieChr
HYHuCV
XwzmntzM
ohs
XGTMaIjTtm
eGskaf

result:

ok good job

Test #32:

score: 0
Accepted
time: 299ms
memory: 42412kb

input:

12 4 6
QT
KBMOHWG
OjBqaPbw
RGKDmDUji
SJkIHnzJ
GViPXZI
FrFFJr
CLwhFmZ
hmtEjR
L
NamjOHHH
VAJKuxFvO
GViPXZI hmtEjR
RGKDmDUji SJkIHnzJ
SJkIHnzJ FrFFJr
OjBqaPbw RGKDmDUji

output:

2
RGKDmDUji FrFFJr hmtEjR L NamjOHHH VAJKuxFvO
QT KBMOHWG OjBqaPbw SJkIHnzJ GViPXZI CLwhFmZ

result:

ok good job

Test #33:

score: 0
Accepted
time: 301ms
memory: 42156kb

input:

10 15 10
a
b
c
d
e
f
g
h
i
j
a b
b c
c d
d e
e a
a f
b g
c h
d i
e j
f h
g i
h j
i f
j g

output:

3
a c i j
e g h
b d f

result:

ok good job

Test #34:

score: 0
Accepted
time: 279ms
memory: 42168kb

input:

10 20 3
a
b
c
d
e
f
g
h
i
j
a b
a d
a h
a j
b c
b e
b i
c d
c f
c j
d e
d g
e f
e h
f g
f i
g h
g j
h i
i j

output:

4
f h j
e g i
b d
a c

result:

ok good job

Test #35:

score: 0
Accepted
time: 386ms
memory: 42176kb

input:

15 0 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o

output:

1
a b c d e f g h i j k l m n o

result:

ok good job

Test #36:

score: 0
Accepted
time: 397ms
memory: 42632kb

input:

15 23 2
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a b
b c
c a
d e
e f
f d
g h
h i
i g
j k
k l
l j
m n
n o
o m
a d
d g
g j
j m
m a
a e
d c
b d

output:

8
l o
k n
i m
h j
c g
a f
b e
d

result:

ok good job

Test #37:

score: 0
Accepted
time: 406ms
memory: 42344kb

input:

15 29 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a b
a e
a g
a j
b c
b h
c d
c g
c k
d e
d h
e f
e k
f h
f g
g i
h j
h i
i k
j k
a c
f i
l m
n o
g e
e m
m g
f k
l n

output:

4
a h k m o
c e i j n
b d g l
f

result:

ok good job

Test #38:

score: 0
Accepted
time: 353ms
memory: 42296kb

input:

15 37 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a b
a c
a d
b c
b d
b e
b f
c d
c h
c g
d e
d f
d i
d h
d g
e f
f h
f i
g h
g k
g j
h i
h k
h l
h j
i k
i l
j k
j m
j n
k l
k n
k o
k m
l n
l o
m n

output:

4
a e g i n o
b h m
c f j l
d k

result:

ok good job

Test #39:

score: 0
Accepted
time: 353ms
memory: 41884kb

input:

12 24 12
a
b
c
d
e
f
g
h
j
i
k
l
a b
a d
a e
a l
b f
b g
b c
c h
c i
c d
d k
d j
e f
g h
j i
l k
e h
e i
f k
f j
g k
g j
h l
i l

output:

4
c e j l
b h i k
d f g
a

result:

ok good job

Test #40:

score: 0
Accepted
time: 385ms
memory: 42408kb

input:

15 45 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a b
a c
a d
a e
b c
b d
b e
c d
c e
d e
f g
f h
f i
f j
g h
g i
g j
h i
h j
i j
k l
k m
k n
k o
l m
l n
l o
m n
m o
n o
a f
f k
k a
b g
g l
l b
c h
h m
m c
d i
i n
n d
e j
j o
o e

output:

5
c i o
b j n
a g m
e f l
d h k

result:

ok good job

Test #41:

score: 0
Accepted
time: 391ms
memory: 42072kb

input:

15 24 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a g
f b
h g
g m
h m
j g
e m
e b
l n
c k
l g
a e
k a
m k
a m
a l
g f
g k
l m
j n
o c
g e
k l
b h

output:

5
d f i m n o
c e h j l
b k
g
a

result:

ok good job

Test #42:

score: 0
Accepted
time: 366ms
memory: 42312kb

input:

15 23 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
k h
i o
l i
j g
l f
n m
h f
h o
a h
l b
k d
m g
j l
i g
j o
m f
l o
o g
j f
o m
j i
l g
k m

output:

5
a b c e f k n o
d h l m
j
i
g

result:

ok good job

Test #43:

score: 0
Accepted
time: 382ms
memory: 42296kb

input:

15 15 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
a b
a c
a d
a e
a f
b c
b d
b e
b f
c d
c e
c f
d e
d f
e f

output:

6
f g h i j k l m n o
e
d
c
b
a

result:

ok good job

Test #44:

score: 0
Accepted
time: 503ms
memory: 42420kb

input:

17 15 17
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
a b
a c
a d
a e
a f
b c
b d
b e
b f
c d
c e
c f
d e
d f
e f

output:

6
f g h i j k l m n o p q
e
d
c
b
a

result:

ok good job

Test #45:

score: 0
Accepted
time: 580ms
memory: 42320kb

input:

17 24 2
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
f b
a j
i o
n a
g f
k d
i c
l j
e h
j h
d b
h o
m g
i p
i h
l b
c q
q l
f p
c h
k c
g n
d g
m i

output:

9
p q
n o
l m
j k
g i
f h
d e
b c
a

result:

ok good job

Test #46:

score: 0
Accepted
time: 603ms
memory: 42448kb

input:

17 104 14
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
a m
d p
n a
k o
k i
n i
o j
i e
g n
a g
k p
g i
c m
k e
f c
f l
m g
j q
p o
n p
f a
f k
j d
m j
e g
i l
b l
f n
o d
j e
a c
q l
d c
a o
o e
i d
e f
h m
q p
a j
h a
e a
d k
j k
l d
p g
d m
p m
h b
i p
j g
g q
f b
k b
q a
l n
p e
d b
l g
f d
f o
a b
f i
d g
...

output:

8
k q
h l p
m o
b e n
i j
f g
a d
c

result:

ok good job

Test #47:

score: 0
Accepted
time: 492ms
memory: 42452kb

input:

17 92 8
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
m b
d k
b p
b o
h l
e l
h c
n l
m c
i l
n k
n b
e b
l a
n q
c f
l o
q e
p q
c q
m l
a i
f q
n i
o n
c o
b j
e f
e h
i d
k j
h i
e d
k q
i b
q m
l c
d n
g j
j e
i c
a d
m j
q j
m d
d c
n a
f l
d p
o a
e i
a p
g q
l p
c e
f p
l j
i o
k b
b f
k c
a q
k f
e o
h ...

output:

7
o q
g n p
e m
k l
f i j
b d h
a c

result:

ok good job

Test #48:

score: 0
Accepted
time: 537ms
memory: 42456kb

input:

17 128 4
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
f g
b d
m p
o i
e j
m f
g p
q k
g q
p l
f l
d k
i l
q i
k b
c n
o n
b p
f b
a p
k e
a d
n a
e d
l b
i a
j c
b h
l e
g a
j l
g b
f k
f c
q p
i e
o q
i p
k o
k h
d n
l d
n j
o h
m j
m e
o f
f h
k i
j f
p c
k l
a k
b c
o l
e q
c h
m b
q h
d o
n m
a f
m i
e c
a...

output:

12
d q
e p
c o
n
m
l
k
i j
g h
f
b
a

result:

ok good job

Test #49:

score: 0
Accepted
time: 582ms
memory: 42180kb

input:

17 15 8
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
e c
g l
d h
j m
n b
f a
k e
l a
d b
i k
j a
c a
n e
p n
b p

output:

3
f h k l m o p q
c d g i j n
a b e

result:

ok good job

Test #50:

score: 0
Accepted
time: 540ms
memory: 42188kb

input:

17 79 9
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
e o
h e
g d
l k
c d
d j
e m
m c
g e
d a
q a
p g
o p
o i
k j
o j
c p
l o
m i
h d
g f
d k
c j
j l
g a
o d
p d
g b
i c
h l
f b
c e
e q
l m
q j
h m
l p
i g
n h
q i
a h
q d
l c
g m
n c
e p
g k
l d
n e
e j
k a
f a
p b
h f
m o
m f
p f
c f
g c
b e
b m
g l
a c
q n
l ...

output:

6
g h o q
j m n p
b l
c k
d f i
a e

result:

ok good job

Test #51:

score: 0
Accepted
time: 520ms
memory: 42548kb

input:

17 60 1
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
a f
b h
j k
c q
l c
a j
n f
m j
o k
c m
a c
m f
i p
e c
e h
g e
d e
j b
a p
k g
k b
p m
n g
g o
o q
a b
n d
g d
j l
a h
e q
d j
e a
l g
h c
q a
c f
e m
b o
p n
c g
q f
m h
n h
i g
i q
l e
a n
n m
o n
h d
a o
h k
h o
a m
d c
i o
f p
m l
i d

output:

17
q
p
o
n
m
l
k
j
i
h
g
f
e
d
c
b
a

result:

ok good job

Test #52:

score: 0
Accepted
time: 547ms
memory: 42392kb

input:

17 89 2
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
k o
g n
l g
h a
j d
n d
e g
i j
b i
o m
j k
c a
l h
q m
i h
e f
g h
d q
c q
a p
o b
a g
c e
i d
a q
a o
f n
f g
f b
q e
k q
g k
m p
n q
d e
i e
p l
f a
o c
h o
c j
d m
e p
a i
g q
l m
c f
h e
d k
a e
m b
h c
m e
l a
a d
c k
f d
b k
k f
g o
b d
h b
c l
d p
e ...

output:

9
l q
o p
m n
a k
h j
g i
f
b e
c d

result:

ok good job

Test #53:

score: 0
Accepted
time: 508ms
memory: 42528kb

input:

17 103 15
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
p o
q a
a n
k h
f g
c q
d e
j l
c p
i d
g a
n o
a c
g p
c m
e n
m q
o m
i k
d o
k g
e k
p h
k l
p i
e h
f e
f h
i l
c o
l n
n c
e q
o a
e m
d k
g d
l q
j i
n h
f c
f m
a b
h l
n i
h i
j f
l a
b q
g h
e b
e g
i b
b g
o q
j b
m a
e p
m n
d q
k n
j p
o f
h c
...

output:

8
g i q
f p
j k o
d n
b m
l
a h
c e

result:

ok good job

Test #54:

score: 0
Accepted
time: 501ms
memory: 42652kb

input:

17 99 14
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
h g
h a
n p
n m
o l
f o
a m
c i
h k
j b
o j
b m
i b
l b
l e
k f
q n
i j
b h
d g
j c
l c
f p
p m
k e
e f
k c
j k
q d
a e
h f
h i
k q
l g
j e
a g
k b
f d
g e
k l
f i
p h
d k
d b
a j
j d
b o
g c
o g
e d
q p
a d
o p
g m
o i
a l
o n
d c
i k
d n
b q
e q
j f
h e
b...

output:

8
h o q
i l p
j n
e m
g k
b f
d
a c

result:

ok good job

Test #55:

score: 0
Accepted
time: 561ms
memory: 42416kb

input:

17 75 9
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
l j
c o
o h
f g
j n
a o
a m
n q
l a
n k
g m
c l
j a
a k
g o
j c
e q
f h
n o
n m
d m
b p
o f
e l
h g
f m
d c
a n
q m
h a
k p
h m
d p
c f
k g
j o
k f
q j
j i
h e
j b
i l
p o
b d
p e
a q
q b
c a
e o
d i
p l
f n
b l
i m
c m
f d
p c
n p
p m
k h
i b
j h
p i
j p
a ...

output:

6
h p q
b k m o
c e g n
f l
d j
a i

result:

ok good job

Test #56:

score: 0
Accepted
time: 579ms
memory: 42540kb

input:

17 10 5
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
k q
p h
n c
i f
k n
a c
g e
g q
n p
g n

output:

4
l m o p q
e h i j n
c d f g k
a b

result:

ok good job

Test #57:

score: 0
Accepted
time: 531ms
memory: 44596kb

input:

17 88 4
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
h o
l i
d g
c e
e l
a d
o g
a o
c p
n m
f h
k g
g a
e g
g j
k n
l b
h g
m i
e b
l c
n a
j m
i n
j b
k q
n g
k a
j o
i a
e m
n b
l d
p a
e q
g p
m f
q j
k p
l k
q m
d f
i b
p b
i q
a c
h b
q b
g i
l n
l g
o c
k d
o p
o l
g b
a j
p e
n h
c h
p l
a b
n e
o d
m ...

output:

6
n p q
b f o
a l m
e h i k
c d j
g

result:

ok good job

Test #58:

score: 0
Accepted
time: 570ms
memory: 45184kb

input:

17 79 4
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
m a
b d
p f
j a
o p
l e
j p
m b
i c
h i
k b
o b
i m
j o
a h
g k
d n
c q
l h
b p
e q
d l
d m
i l
j i
f c
c n
a f
l q
c h
h f
e d
k n
i d
o i
l n
d c
j k
b c
j l
i n
p k
q d
e m
f d
i f
p g
p a
l f
g b
e b
e f
b j
n h
k d
g d
f k
q o
m p
a b
l p
n m
h q
e n
d ...

output:

6
p q
a d o
f g j n
c k l m
e i
b h

result:

ok good job

Test #59:

score: 0
Accepted
time: 525ms
memory: 45724kb

input:

17 9 3
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
i q
d p
g d
e h
a l
h f
d c
j a
j c

output:

6
o p q
l m n
i j k
c g h
d e f
a b

result:

ok good job

Test #60:

score: 0
Accepted
time: 512ms
memory: 46328kb

input:

17 78 2
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
j p
m p
n q
m g
a n
o e
k m
c e
i l
j m
g c
p a
p l
n b
o d
d f
o p
i m
f b
b l
n p
c i
d g
p e
n g
b a
j k
g p
b p
m h
a q
e d
k o
k i
j c
d c
g h
c f
e f
a e
i e
o h
k g
n o
j q
i g
m q
p c
a i
j a
l h
g f
i f
k e
n d
m e
c l
h d
i h
o a
m a
b d
f h
c n
h ...

output:

9
p q
l o
m n
h k
i j
e g
a f
d
b c

result:

ok good job

Test #61:

score: 0
Accepted
time: 601ms
memory: 46608kb

input:

17 22 9
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
p i
l k
a p
l o
l p
b k
e h
g j
i m
o f
o j
n h
l e
m o
n i
b n
m n
f c
n c
k o
j n
l b

output:

3
d e f g k n p q
a b c h i o
j l m

result:

ok good job

Test #62:

score: 0
Accepted
time: 573ms
memory: 46796kb

input:

17 29 3
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
i l
f q
d j
n b
b k
c l
c p
m j
b c
i e
m b
i b
a p
o q
a e
f j
g j
o m
h c
n e
k o
g l
k j
b p
p o
j h
c i
j i
n c

output:

6
n p q
j l o
i k m
f g h
c d e
a b

result:

ok good job