QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#861059#9970. Looping RPSucup-team4744#TL 3959ms76492kbC++204.1kb2025-01-18 16:02:562025-01-18 16:03:26

詳細信息

Test #1:

score: 100
Accepted
time: 536ms
memory: 41028kb

input:

6
P
PN
KK
N
PKK
PN

output:

6

result:

ok 1 number(s): "6"

Test #2:

score: 0
Accepted
time: 529ms
memory: 42524kb

input:

10
KKKNP
KNKPPKNK
KNKPP
KNKPPKN
KKKN
NNKNNNKNNNKNNNKNNNKNNNKNNNKNNPN
NNKN
NPPN
NNKNNNKNNNKNNNKNNNKNNNKNNNK
KKKNN

output:

3

result:

ok 1 number(s): "3"

Test #3:

score: 0
Accepted
time: 533ms
memory: 42680kb

input:

10
NNNPNNNPNNNPNNNK
KKN
NNNP
KKP
NNNPNNNPNNNPN
KKNKKNKKPN
KNNPNPNKKKNPPKNKKKNKNKKNKPPPNKKPKP
KKPK
KKNKKNK
KKPKKN

output:

3

result:

ok 1 number(s): "3"

Test #4:

score: 0
Accepted
time: 527ms
memory: 39664kb

input:

10
K
PPPNNPPPNNPPPNNPPPNNPPPNNPPPNNPPPNNPPPNNP
PPKP
PPPNNPPPNNPPPNNPPPNNPPPNNPPPNNPPPNNPPPNNPPPK
P
K
N
P
PPPNN
N

output:

25

result:

ok 1 number(s): "25"

Test #5:

score: 0
Accepted
time: 534ms
memory: 41428kb

input:

10
NPNKP
NNNNKNNNNPP
PPKPNNNNPNKKKN
NPNKPNP
NNNNKN
NNNNK
NKNPKKPNPKKNPNKN
NKNPKKPNPKKNPNK
NKNPKKPNPKKNP
NPNKPNPN

output:

30

result:

ok 1 number(s): "30"

Test #6:

score: 0
Accepted
time: 532ms
memory: 41196kb

input:

10
KPKKPKKPKKPKKP
KPKKPKKPKKPKKPKNK
PNPNP
KPK
PN
NPNPNNPNPNK
NKKPKKPKPPKKPKKKKPKNKPPKPPNKNP
NPNPNNP
PNPNPK
NPNPN

output:

39

result:

ok 1 number(s): "39"

Test #7:

score: 0
Accepted
time: 533ms
memory: 40948kb

input:

4
KKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPK
NN
KKP
KKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKPKKNK

output:

1

result:

ok 1 number(s): "1"

Test #8:

score: 0
Accepted
time: 533ms
memory: 42724kb

input:

7
KPKN
KPKNKPKNKPKNKPKK
NKPPNNNPKKNN
KPPKPKPPKPKPPKPKPPKPKPP
KPKNKPKNKPKNKP
KPPKP
KPPKPKPPKPKPPKPKPPKPKPPKPN

output:

2

result:

ok 1 number(s): "2"

Test #9:

score: 0
Accepted
time: 527ms
memory: 40648kb

input:

10
NKNNKNKN
KPKN
PKPN
PNNNNNNKKNNPNNKNPPKPPNPNPPKKKPNNNPNPKKNK
PKPNPKP
PKPNPK
KPKNKP
NKNNKNKNNKNPN
KPKNKPK
NKNNK

output:

39

result:

ok 1 number(s): "39"

Test #10:

score: 0
Accepted
time: 539ms
memory: 40884kb

input:

300
NKNPNK
NKKNKK
KPPNPN
KKPNKNK
PKKNPKP
KPKPPPN
NNKPPNN
NPKPPKN
KNNKKPK
PPPNPKK
NKPKNP
KPKNNPP
NNPKNP
PNPPPKN
PKKPNP
PPNNKK
PKNKNK
PKNPNK
NKNPNPP
KNKNNPN
NKPPPPK
NNPPKKN
KNKKNPK
KKNNPKN
PPPKNK
NPPPPPP
NKKPKPP
KNKNPPK
KPKPNNK
NPNNKN
PNPNKP
PNPKKP
KKKKPKN
NNNKNPK
NPNKPNK
NNNKNK
PPKKNKP
NNNKPPK
KPNKPP...

output:

1102940

result:

ok 1 number(s): "1102940"

Test #11:

score: 0
Accepted
time: 544ms
memory: 41116kb

input:

91
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKN
KKKKKKKKP
PNPKPPNP
KKKN
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKN
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKP
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKN
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKP
KKKKKKKKKKKKKKKKKKKKKKN
KKKKKKKN
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKP
KKKKKKKKKKKKP
...

output:

2151

result:

ok 1 number(s): "2151"

Test #12:

score: 0
Accepted
time: 532ms
memory: 40772kb

input:

72
PKPPKPPKPPKPPKPPN
PKP
NNNNNK
NPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNPNNP
NNPNNPNNPNNPNNPNNK
NP
PPPPPPN
PKPPKPPKPPKPPKPP
PPPPKPP
PPK
NNNNNPP
NNNNPNNNNPNNNNPN
KPNNNKKPPKPKKNPPKKNNKPKPKPKPPPKPPKPNNKPPKPPPNNNKKNNPKKKKKN...

output:

14794

result:

ok 1 number(s): "14794"

Test #13:

score: 0
Accepted
time: 535ms
memory: 41684kb

input:

91
PKKK
KKKNKKKKNKKKKNKK
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPKP
PPPPNPPPPNPPPPNPPPPNPPPPK
PPPPNNPPPPPNNPPPPPNNPPPPPNNPPPPK
NKNKNKNKN
PNPPNPKPPNPPN
NPKNPKNPKNPKNPKNPKNPKNPKNP
PNPPNPKPPNP
KKPK
KKKKKNKKKKKKNKKKKKPN
NPK
PPNKPPKPPNKPPPNKPPK
KKP
PNPPNPPNPPNPKK
PPPPPPNPPPPPPNPPPPPPNPPPPPPK
PPPPPPNPPP...

output:

24738

result:

ok 1 number(s): "24738"

Test #14:

score: 0
Accepted
time: 536ms
memory: 40788kb

input:

130
PKPKPKPKPNPKPKPKPKPKPN
NPNPNPNPN
N
PNKPNKP
PNKPK
NNNNKNNNNPPNNNNKNNNNNKNNNNPP
NNNNNNNNKNNNNNNNNKN
NK
K
NPPNKNPPN
NKNKNKNNKNKNKNNKNKNKNNKNKNKNKNNKNKNKNNKNKNKNNKNKNKNPN
PKPKPKPKPKPKPKPKPKPKPNKPKPKPKPKPKPKPKPKPKPKP
NNNNNNNNK
KKKN
PPPN
NNNNNNNNNNNNKN
NPKNPKNPP
PPPKNPPPKNPPPKNP
PPPPPNP
KKP
PKN
PPPPPN...

output:

86902

result:

ok 1 number(s): "86902"

Test #15:

score: 0
Accepted
time: 534ms
memory: 40548kb

input:

76
N
NKNKNNKNKNKN
KPKPKPKPKPKN
NK
KKKKKNK
NNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNKNNPNNPNNNPNNPNNKNNPNNPNNPNNKNNPNNPNNNPNNPNNK
NNPNNPNNPNNPNNPNNPNNPNNPNNK
KKKKKKKKKKPKKKKKKKKKKNP
KKPKKPK
PPPPPPPPPPPN
...

output:

12533

result:

ok 1 number(s): "12533"

Test #16:

score: 0
Accepted
time: 535ms
memory: 39772kb

input:

35
KPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKNKKP
P
KNKNKKNKNKNKKNKNKP
N
KKKKKKKKKKKKKKKKKKKKPKKKKKKKKKKKKKKKKKKKKKP
PNPNPNP
KPKPKPKPKPKPKPKPKNKKPKPKPKPKPKPKPKPKPKNK...

output:

1178

result:

ok 1 number(s): "1178"

Test #17:

score: 0
Accepted
time: 530ms
memory: 40944kb

input:

19
KPKPKPKPKKPKPKPKPKKPKPKPKPKKPKPKPKPKN
NPNPNNPNPNNP
NPNPNNPNPNNPNPNPNNPNPNNPNPNPNNPNPNNPNPNPNNPNPNNPNPNPNNPNPNNPNPNK
NPNPNNPNPNNPNPNPNNPNPNNPNPNPNNPNPNNPNPNPNNPNPNNPNPNPN
KPKNPKPKNPKPKKPKNPKPKNPKPKKPKNPKPKNPKPKKPKNPKPKNPKPKKPKNPKPKNPKPKKPKNP
NKKKPNKPKNKPPPNKPPNPNNNNPKPKPNKKNPNKKPNPNPKNKPPKKNNKPPKK...

output:

249

result:

ok 1 number(s): "249"

Test #18:

score: 0
Accepted
time: 532ms
memory: 42596kb

input:

32
NNKPNNNKPNNP
PNPPNPPNPPNPPNPK
PNP
NNPNNNPNNPNNNPNNPNNNPNNPN
P
NNPNNNPNNPNNNPNNPNNNPNNPNNNPNNK
NKNKNKNP
NNNNNNNNP
NPKNKNPKNKNPKNKNPKNKNPK
N
N
PPPPKP
N
KPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPKKPKPKPK...

output:

894

result:

ok 1 number(s): "894"

Test #19:

score: 0
Accepted
time: 534ms
memory: 39628kb

input:

300
PKK
KNP
PNPNPKPNPNPNPKPNPNPP
KNN
KPN
KNN
KKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNKKKNK
KKKN
...

output:

1120793

result:

ok 1 number(s): "1120793"

Test #20:

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

input:

45
PPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPPPPPPPPPKPP...

output:

2514

result:

ok 1 number(s): "2514"

Test #21:

score: 0
Accepted
time: 534ms
memory: 41424kb

input:

56
PNPPNPKNPNPPNPPNPKNPNPPNPPNPKN
NKN
PPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPKPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNPPPPPPPNPPPPPPPNPPPPPPNPPPPPPPNP...

output:

5856

result:

ok 1 number(s): "5856"

Test #22:

score: 0
Accepted
time: 533ms
memory: 41632kb

input:

55
K
PPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPPPNPKKPPPPPPPPPPPPPPPPKNPKNNPKPKPNPKKKKPKKPKKPPPP
PPNPPNPPPNPPNPPKPNPNPPNNNNK
KKKKKPPKKKKKPPKKKKKPPKKKKKNKKKKKPPKKKKKPPKKKKKPPKKKKKPPKKKKKNKKKKKPPKKKKKPPKKKKKPPKKKKKKKPPKKKK...

output:

5925

result:

ok 1 number(s): "5925"

Test #23:

score: 0
Accepted
time: 534ms
memory: 41932kb

input:

5000
PPK
PKN
NPK
KKN
PPN
NKK
NNP
KNK
KPP
NNP
NPP
KKN
NKK
KKK
PKN
NPP
PNK
NPK
KNP
PNP
KKN
NNK
PKK
PPP
KKN
NKP
KPK
KKK
PNK
PNK
NNK
KKP
KKK
NNK
PPP
PNP
PNP
KKN
NPN
PNK
NNK
PKK
PPN
KKP
PKK
NKP
KNP
PPK
NNK
PKP
PPN
KNP
PKK
NNN
KPP
KPN
KKN
PNP
NKK
KPP
NNN
NKP
NPK
NPP
PNN
NNK
KKP
PPP
NKP
KPN
KNN
PNN
NPP
KPP...

output:

5201172138

result:

ok 1 number(s): "5201172138"

Test #24:

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

input:

48
PPPNNPPKKNPKNNKKPKPKPPKNPPPKKPPNPNPKKPPPPPNPNPNPPPNPKPNPPPKKKNPKKPPPNPNNKKKKPKPPPPPPKPPNPKPNNPPPNPKKNPKNPPNKNNNNPNPNKNPKKKKNKNKKKPPNNKKKKNNPPNPNNNKNNPPKPPPKPKKKPPNNPNPKNKNPPPNNPPKKNPKNNKKPKPKPPKNPPPKKPPNPNPKKPPPPPNPNPNPPPNPKPNPPPKKKNPKKPPPNPNNKKKKPKPPPPPPKPPNPKPNNPPPNPKKNPKNPPNKNNNNPNPNKNPKKKKNKN...

output:

3732

result:

ok 1 number(s): "3732"

Test #25:

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

input:

31
PPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPPPPNPP...

output:

928

result:

ok 1 number(s): "928"

Test #26:

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

input:

67
KPNKKPNKKPNKKN
NP
KKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKKPKKKKKKKPKKKKKKK...

output:

10794

result:

ok 1 number(s): "10794"

Test #27:

score: 0
Accepted
time: 533ms
memory: 43348kb

input:

49
PNKPNKPNKPNKPNKPNNPNNNNNK
NPNNPNPNNPNPNNPNNPNPNNPNPNNPNPNNPNNPNPNNPNPNNPNNPNPNNPNPNNPNPNNPNNPNPNNPNPNNPNNP
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKP
N
PPPKPPPPKPPPPKPPPPKPPPPKPPPPK
PNKPNKPNKPNKPNKPNNPNNNNNKPNKPNKPNKPNKPNKPNNPNNNNNKPNKPNKPNKPNKPNKPNNPNNNNNKPNKP...

output:

2554

result:

ok 1 number(s): "2554"

Test #28:

score: 0
Accepted
time: 532ms
memory: 43596kb

input:

34
NNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNNPNNPNNPNNPNNPNNPNNNPNNPNNPN...

output:

938

result:

ok 1 number(s): "938"

Test #29:

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

input:

55
PPPPPPPPPPPPPPPKPPPPPPPPPPPPPPPPPKPPPPPPPPPPPPPPPKPPPPPPPPPPPPPPPPPKPPPPPPPPPPPPPPPN
NNNNNPNNNNNPNNNNNKNNNNNP
KPNKNPPKKNKNNKNPNKKPPNKKKKPPPPPNKKPNKPPKPPPPNPNNNNKKPNPKPKNKPKNKPPNPKKPKPPKPPKNKPPNKKPKKPPNPKKPPNPPNKKKNKPNKNPPKKNKNNKNPNKKPPNKKKKPPPPPNKKPNKPPKPPPPNPNNNNKKPNPKPKNKPKNKPPNPKKPKPPKPPKNKPPN...

output:

6093

result:

ok 1 number(s): "6093"

Test #30:

score: 0
Accepted
time: 536ms
memory: 43376kb

input:

19
NKNPNKNPNKNPNKNNKNPNKNPNKNPNKNNKNPNKNPNKNPNKNNKNP
PKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPKNPKPPKPPKKNKNPNPKPPKPPK...

output:

6

result:

ok 1 number(s): "6"

Test #31:

score: 0
Accepted
time: 529ms
memory: 43320kb

input:

13
NNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNKNNNK
KPKPKPKPKPKPKPKPKPKPKPKKKPKPKPKPKPKPKPKPKPKPKPKPKKKPKPKPKPKPKPKPKPKPKPKPKNNKPKPNPNNNNKKKKKKKNNNNPPPPKPK
NNKNNNKNNNKNNNKNNNKNNNKNN...

output:

4

result:

ok 1 number(s): "4"

Test #32:

score: 0
Accepted
time: 3959ms
memory: 76492kb

input:

100000
KPKPNKPKKK
NKNPNKKPPP
NNKNPPNNKP
KPKPKPKNPN
NKPKKKKKPP
NKPNPKKPPP
NNKPNPKPNN
PPPKNNKNKN
KNNNNKKNKP
NNNKPKPKNN
PKPKNKPPPP
NKNPNPKPNP
KKPPPPKPKP
PNKKNKKKKK
PKKNNNKPKK
KKNPNPKKNK
NNKPKPPPPK
KPNKKPKKKK
PPNNKPKNKP
KPNNNPNNPN
NKKNKPNPPK
KKNNPNKPNP
KNNNPPPNNP
PNPNNNKKNK
NPKPNNPKKN
NNNPPPKKKP
PPPPNNN...

output:

41666533063326

result:

ok 1 number(s): "41666533063326"

Test #33:

score: -100
Time Limit Exceeded

input:

90910
PKNNKKKNNKN
PPKPNNKPKNN
KPKNPNPKKPN
NPNNNNPPKKP
PPPPNNKPNKP
PPKPNPPPPPP
NKPKKPNKNNK
KKNKPPPPPKP
PPPPPNNPKKP
PKNKKPPKKPP
PKKPNNPNPNP
PNPNKNPPPPN
KPNNPKKKKKN
NKNKPNPPPKK
NNKPPNNKPNK
KKPNNKPNNNP
KPNPKPKNPPN
PPKNNKNNNKP
KNNNNNNNPPK
NNPKPNKNNNN
KKNPPNPNKNP
NPPPPKNNPNK
PNNPPNKNKPN
KNNPNNNNNKN
KPNPPN...

output:


result: