QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502904#8656. Is-A? Has-A? Who Knowz-A?xiaowuc1AC ✓451ms79336kbJava82.4kb2024-08-03 15:27:092024-08-03 15:27:13

详细

Test #1:

score: 100
Accepted
time: 42ms
memory: 41288kb

input:

5 5
Day is-a Time
Appointment is-a Datebook
Appointment is-a Reminder
Appointment has-a Day
Datebook has-a Year
Day is-a Time
Time is-a Day
Appointment has-a Time
Appointment has-a Year
Day is-a Day

output:

Query 1: true
Query 2: false
Query 3: true
Query 4: true
Query 5: true

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 45ms
memory: 37164kb

input:

13 23
Zoo has-a Aviary
Zoo has-a ElephantHouse
ElephantHouse has-a Elephant
Aviary has-a Ostrich
Aviary has-a Mallard
Duck is-a Bird
Bird is-a Animal
Mallard is-a Duck
Ostrich is-a Bird
Mammal is-a Animal
Elephant is-a Mammal
Bird has-a Beak
Elephant has-a Trunk
Aviary has-a Beak
Elephant has-a Beak...

output:

Query 1: true
Query 2: false
Query 3: true
Query 4: false
Query 5: true
Query 6: true
Query 7: true
Query 8: false
Query 9: true
Query 10: true
Query 11: true
Query 12: true
Query 13: false
Query 14: false
Query 15: true
Query 16: true
Query 17: true
Query 18: false
Query 19: false
Query 20: false
Q...

result:

ok 23 lines

Test #3:

score: 0
Accepted
time: 55ms
memory: 39472kb

input:

13 200
A has-a I
B is-a A
C is-a B
D is-a C
D has-a H
E is-a A
E has-a C
F is-a E
F has-a H
G is-a F
H has-a J
I is-a H
J has-a B
A is-a A
B is-a A
C is-a A
D is-a A
E is-a A
F is-a A
G is-a A
H is-a A
I is-a A
J is-a A
A is-a B
B is-a B
C is-a B
D is-a B
E is-a B
F is-a B
G is-a B
H is-a B
I is-a B...

output:

Query 1: true
Query 2: true
Query 3: true
Query 4: true
Query 5: true
Query 6: true
Query 7: true
Query 8: false
Query 9: false
Query 10: false
Query 11: false
Query 12: true
Query 13: true
Query 14: true
Query 15: false
Query 16: false
Query 17: false
Query 18: false
Query 19: false
Query 20: false...

result:

ok 200 lines

Test #4:

score: 0
Accepted
time: 54ms
memory: 38296kb

input:

11 162
A has-a E
B has-a F
C has-a D
D has-a G
C is-a A
C is-a B
C is-a D
D is-a B
F has-a H
G is-a F
G has-a I
A is-a A
B is-a A
C is-a A
D is-a A
E is-a A
F is-a A
G is-a A
H is-a A
I is-a A
A is-a B
B is-a B
C is-a B
D is-a B
E is-a B
F is-a B
G is-a B
H is-a B
I is-a B
A is-a C
B is-a C
C is-a C...

output:

Query 1: true
Query 2: false
Query 3: true
Query 4: false
Query 5: false
Query 6: false
Query 7: false
Query 8: false
Query 9: false
Query 10: false
Query 11: true
Query 12: true
Query 13: true
Query 14: false
Query 15: false
Query 16: false
Query 17: false
Query 18: false
Query 19: false
Query 20: ...

result:

ok 162 lines

Test #5:

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

input:

100 100
Mase is-a Poig
Iqfd is-a Mdce
Dtax has-a Fvhf
Loab has-a Loab
Dkfb is-a Nwjb
Jmwd has-a Vhdl
Jmwd has-a Dtax
Ebdb has-a Mujq
Wpan has-a Nwjb
Svsn has-a Svsn
Lshg is-a Nzlp
Loab is-a Svsn
Jmwd has-a Fvhf
Mujq has-a Lshg
Poig is-a Svsn
Nwjb has-a Uqaq
Uqaq is-a Vhdl
Mujq has-a Fvhf
Nzlp is-a P...

output:

Query 1: true
Query 2: true
Query 3: true
Query 4: false
Query 5: true
Query 6: false
Query 7: true
Query 8: true
Query 9: false
Query 10: true
Query 11: false
Query 12: true
Query 13: false
Query 14: true
Query 15: false
Query 16: true
Query 17: false
Query 18: true
Query 19: true
Query 20: true
Qu...

result:

ok 100 lines

Test #6:

score: 0
Accepted
time: 54ms
memory: 38180kb

input:

100 100
Ssx has-a Cgx
Poj has-a Dbl
Klc is-a Ypz
Cgx is-a Poj
Cic is-a Lzb
Hqh is-a Kht
Oer has-a Fwx
Eqc is-a Kht
Asn is-a Hqh
Vmm has-a Fxd
Asn is-a Wyv
Wyv has-a Ssx
Rgr has-a Dhd
Vog has-a Csc
Poj has-a Hxf
Kms is-a Ssx
Llt has-a Jpb
Poj has-a Kms
Eha has-a Oer
Ikc has-a Klc
Hqh has-a Asn
Poj ha...

output:

Query 1: false
Query 2: false
Query 3: false
Query 4: false
Query 5: false
Query 6: false
Query 7: false
Query 8: false
Query 9: true
Query 10: false
Query 11: true
Query 12: true
Query 13: false
Query 14: false
Query 15: false
Query 16: true
Query 17: false
Query 18: false
Query 19: true
Query 20: ...

result:

ok 100 lines

Test #7:

score: 0
Accepted
time: 106ms
memory: 42888kb

input:

1000 1000
Jxsi is-a Lliq
Lafq has-a Pgec
Avfp is-a Vtlx
Kbfw is-a Tzho
Kbfw is-a Qrvd
Aaeo is-a Niig
Pgec has-a Kjet
Dlio is-a Tgvq
Gzjq is-a Zkqz
Rdrx is-a Ynan
Aaeo has-a Lmob
Aqvo has-a Bmar
Brgc has-a Nway
Rwkp has-a Yixw
Gmxf is-a Vtoo
Iapr is-a Kjzz
Dwkr is-a Qwbm
Lmob has-a Xezo
Bkos is-a Vhb...

output:

Query 1: true
Query 2: false
Query 3: false
Query 4: false
Query 5: false
Query 6: true
Query 7: true
Query 8: false
Query 9: false
Query 10: true
Query 11: true
Query 12: false
Query 13: false
Query 14: false
Query 15: true
Query 16: true
Query 17: false
Query 18: true
Query 19: true
Query 20: fals...

result:

ok 1000 lines

Test #8:

score: 0
Accepted
time: 451ms
memory: 63864kb

input:

10000 10000
Excd has-a Fbrr
Pmin has-a Qzko
Ebiz has-a Dhhy
Elje is-a Qkzd
Utfc has-a Jclg
Fzrk has-a Ljyo
Ebiz is-a Zapl
Jrnf has-a Tydo
Blrx is-a Dwpy
Ahsi has-a Uhbn
Ebif is-a Lwlz
Swjp has-a Ndzg
Gthw has-a Umpj
Ailf is-a Tzax
Pect is-a Rhow
Tznn has-a Ahsi
Qhlv has-a Ceft
Djpe has-a Tfwo
Heop h...

output:

Query 1: true
Query 2: true
Query 3: true
Query 4: false
Query 5: false
Query 6: true
Query 7: false
Query 8: false
Query 9: false
Query 10: true
Query 11: false
Query 12: true
Query 13: true
Query 14: false
Query 15: true
Query 16: false
Query 17: true
Query 18: true
Query 19: true
Query 20: true
Q...

result:

ok 10000 lines

Test #9:

score: 0
Accepted
time: 331ms
memory: 67380kb

input:

10000 10000
Fwrh is-a Xxgw
Tscj is-a Vgft
Bkwx is-a Ubnz
Atnb has-a Rawz
Tfvg has-a Ltie
Ssja has-a Zrqr
Salv has-a Qidf
Kbww is-a Mofo
Vccp has-a Vfuk
Erns is-a Rjiz
Nwkj is-a Orlq
Blvw has-a Wprc
Hgey has-a Lvqh
Ikbx is-a Kvcu
Mofo is-a Wgqd
Mmao is-a Xjtf
Jonu is-a Orlq
Hqqp is-a Kyaz
Yvga has-a ...

output:

Query 1: true
Query 2: false
Query 3: true
Query 4: true
Query 5: true
Query 6: true
Query 7: true
Query 8: true
Query 9: true
Query 10: true
Query 11: true
Query 12: true
Query 13: false
Query 14: false
Query 15: true
Query 16: false
Query 17: true
Query 18: true
Query 19: true
Query 20: false
Quer...

result:

ok 10000 lines

Test #10:

score: 0
Accepted
time: 349ms
memory: 79336kb

input:

10000 10000
Iglw has-a Gbok
Mvkc has-a Xoul
Lque is-a Nxcb
Gtym is-a Qfjp
Elge is-a Vmdk
Nczz has-a Fhwo
Ohyg has-a Fzgb
Irxt has-a Ajte
Fqwp has-a Vcuj
Fzcu is-a Succ
Rhhk is-a Tyzl
Tmtv has-a Rozi
Bbla is-a Fzcu
Dejb is-a Jhhs
Qfjp is-a Wymn
Azfo is-a Jior
Alth has-a Ntbr
Jkiu has-a Qipa
Cocw has-...

output:

Query 1: true
Query 2: false
Query 3: false
Query 4: false
Query 5: true
Query 6: true
Query 7: true
Query 8: true
Query 9: true
Query 10: true
Query 11: true
Query 12: false
Query 13: true
Query 14: false
Query 15: false
Query 16: false
Query 17: false
Query 18: false
Query 19: true
Query 20: true
...

result:

ok 10000 lines

Test #11:

score: 0
Accepted
time: 123ms
memory: 49372kb

input:

499 10000
AA is-a AB
AA is-a AC
AB is-a AD
AB is-a AE
AC is-a AF
AC is-a AG
AD is-a AH
AD is-a AI
AE is-a AJ
AE is-a AK
AF is-a AL
AF is-a AM
AG is-a AN
AG is-a AO
AH is-a AP
AH is-a AQ
AI is-a AR
AI is-a AS
AJ is-a AT
AJ is-a AU
AK is-a AV
AK is-a AW
AL is-a AX
AL is-a AY
AM is-a AZ
AM is-a BA
AN i...

output:

Query 1: true
Query 2: true
Query 3: false
Query 4: true
Query 5: false
Query 6: false
Query 7: false
Query 8: true
Query 9: false
Query 10: false
Query 11: false
Query 12: false
Query 13: false
Query 14: false
Query 15: false
Query 16: true
Query 17: false
Query 18: false
Query 19: false
Query 20: ...

result:

ok 10000 lines

Test #12:

score: 0
Accepted
time: 218ms
memory: 78844kb

input:

500 10000
AA is-a AB
AB is-a AC
AC is-a AD
AD is-a AE
AE is-a AF
AF is-a AG
AG is-a AH
AH is-a AI
AI is-a AJ
AJ is-a AK
AK is-a AL
AL is-a AM
AM is-a AN
AN is-a AO
AO is-a AP
AP is-a AQ
AQ is-a AR
AR is-a AS
AS is-a AT
AT is-a AU
AU is-a AV
AV is-a AW
AW is-a AX
AX is-a AY
AY is-a AZ
AZ is-a BA
BA i...

output:

Query 1: true
Query 2: true
Query 3: true
Query 4: true
Query 5: true
Query 6: true
Query 7: true
Query 8: true
Query 9: true
Query 10: true
Query 11: true
Query 12: true
Query 13: true
Query 14: true
Query 15: true
Query 16: true
Query 17: true
Query 18: true
Query 19: true
Query 20: true
Query 21:...

result:

ok 10000 lines

Test #13:

score: 0
Accepted
time: 181ms
memory: 57272kb

input:

524 10000
AA is-a BA
BA is-a CA
CA is-a DA
DA is-a EA
EA is-a FA
FA is-a GA
GA is-a HA
HA is-a IA
IA is-a JA
JA is-a KA
KA is-a LA
LA is-a MA
MA is-a NA
NA is-a OA
OA is-a PA
PA is-a QA
QA is-a RA
RA is-a SA
SA is-a TA
TA is-a UA
UA is-a VA
VA is-a WA
WA is-a XA
XA is-a YA
AA has-a AB
AB has-a AC
AC...

output:

Query 1: false
Query 2: true
Query 3: false
Query 4: false
Query 5: false
Query 6: true
Query 7: false
Query 8: false
Query 9: false
Query 10: false
Query 11: false
Query 12: true
Query 13: true
Query 14: false
Query 15: false
Query 16: false
Query 17: false
Query 18: true
Query 19: true
Query 20: f...

result:

ok 10000 lines

Test #14:

score: 0
Accepted
time: 141ms
memory: 50488kb

input:

1000 5000
Pzre is-a Sshn
Zuzf has-a Fjnk
Nnel has-a Ugxd
Lfon is-a Qkcd
Asjn has-a Mkix
Fxou is-a Rhec
Zopl has-a Smgh
Kxdc is-a Yliz
Cqyo has-a Vjlg
Heoy is-a Qmjy
Iqvl has-a Asac
Fubm is-a Jmah
Bmcq has-a Vlbk
Ovqf is-a Qfyb
Rhec has-a Odzh
Heoy has-a Wsds
Cblr is-a Yhaf
Zhqn has-a Hefg
Aasp has-a...

output:

Query 1: true
Query 2: false
Query 3: false
Query 4: false
Query 5: false
Query 6: true
Query 7: true
Query 8: false
Query 9: false
Query 10: true
Query 11: true
Query 12: false
Query 13: true
Query 14: true
Query 15: true
Query 16: false
Query 17: true
Query 18: false
Query 19: true
Query 20: false...

result:

ok 5000 lines

Test #15:

score: 0
Accepted
time: 245ms
memory: 57440kb

input:

5000 5000
Bmwj has-a Jtlr
Ffhg has-a Zgnh
Sfaf has-a Ibvz
Plqq is-a Vusm
Bmwj has-a Pyuw
Crwt has-a Ygex
Txyh has-a Qtti
Reol has-a Tskt
Aadh is-a Svjm
Dygw is-a Zaav
Xxho has-a Lduo
Onaq is-a Srjy
Iszt is-a Zksj
Misw is-a Pmlh
Nsoh is-a Pisv
Tuil has-a Bnew
Qdnz has-a Khab
Ibvz is-a Oyzi
Lcbs has-a...

output:

Query 1: true
Query 2: true
Query 3: false
Query 4: true
Query 5: false
Query 6: false
Query 7: true
Query 8: false
Query 9: true
Query 10: false
Query 11: true
Query 12: true
Query 13: true
Query 14: true
Query 15: true
Query 16: false
Query 17: false
Query 18: true
Query 19: false
Query 20: false
...

result:

ok 5000 lines

Test #16:

score: 0
Accepted
time: 59ms
memory: 40320kb

input:

100 500
Axlz has-a Ctzx
Vshk has-a Wbzh
Mked is-a Rdjt
Flhn is-a Flrq
Kyxw is-a Lrid
Ngru is-a Vshk
Bbfu has-a Uzif
Ctzx has-a Axlz
Xycu is-a Yavx
Qddi has-a Qddi
Uyfn is-a Vlsd
Flhn is-a Vshk
Epno has-a Uyfn
Tgau is-a Tkme
Tgau has-a Jkrq
Axlz is-a Fert
Yavx has-a Hsvl
Opvj is-a Yasu
Lwij is-a Xycu...

output:

Query 1: false
Query 2: true
Query 3: false
Query 4: true
Query 5: true
Query 6: false
Query 7: false
Query 8: true
Query 9: true
Query 10: true
Query 11: true
Query 12: false
Query 13: true
Query 14: false
Query 15: false
Query 16: true
Query 17: false
Query 18: false
Query 19: false
Query 20: true...

result:

ok 500 lines