用户输出
2
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#23128 | #2032. 黑吗喽大战金池长老 | Wrong Answer | 23 | 3452 ms | 3556 K | Python 3 / 1.1 K | 192022215029 | 2024-12-15 19:04:29 |
import copy
n=int(input().strip())
alp=[chr(n + 96) for n in range(1,27)]
dp={i:0 for i in alp}
m=input().strip()
dp[m[0]]=1
max=0
fin_max=0
def repeat(max,i,m):
temp=copy.deepcopy(max)
t=i-4
while temp>0:
if m[i]==m[t]:
return False
else:
t-=3
temp-=1
return True
for i in range(1,len(m)):
if m[i]==m[i-1]:
if dp[m[i-1]]==3:
if max>fin_max:
fin_max=max
max=0
dp={i:0 for i in alp}
dp[m[i]]+=1
else:
dp[m[i]] += 1
if i == len(m) - 1 and dp[m[i]] == 3 and max + 1 > fin_max:
fin_max = max + 1
else:
if dp[m[i-1]]==3 :
dp[m[i]]+=1
max+=1
if not repeat(max-1,i,m):
if max > fin_max:
fin_max = max
max -= 1
dp[m[i]]=0
dp[m[i]] += 1
else:
if max>fin_max :
fin_max=max
max=0
dp={i:0 for i in alp}
dp[m[i]]+=1
print(fin_max)
用户输出
2
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
0
系统信息
Exited with return code 0
用户输出
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
57148
kkkadddooookyinfiqiiineeewwwwguuunwuuuawwwvoaooodedocccdddntwwwsssagyowwwyacccvaaaaiiicaaawww
<57057 bytes omitted>
用户输出
11
系统信息
Exited with return code 0
57148
kkkadddooookyinfiqiiineeewwwwguuunwuuuawwwvoaooodedocccdddntwwwsssagyowwwyacccvaaaaiiicaaawww
<57057 bytes omitted>
用户输出
11
系统信息
Exited with return code 0
57148
kaaadddooooookkkyyyiiinfffiiiqqqiiinnneeewwwwggguuunnnwuawwwvvvoooaaaooodddedddooocccdddnnntt
<57057 bytes omitted>
用户输出
16
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
57148
kaaadddooooookkkyyyiiinnnfffiiiqqqiiinnneeewwgggunnnwwwuuuaaawwwvvvoooaaaooodddeeedddooocdnnn
<57057 bytes omitted>
用户输出
20
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
157148
kaaadddooooookkkyyyiiinnnfffiiiqqqiiinnneeewwwwwwgggunnnwwwuuuaaawwwvvvoooaaaooodddeeedddooo
<157058 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
157148
kaaadddooooookkkyyyiiinnnfffiiiqqqiiinnneeewwwwwwgggunnnwwwuuuaaawwwvvvoooaaaooodddeeedddooo
<157058 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
157148
kaaadddooooookkkyyyiiinnnfffiiiqqqiiinnneeewwwwwwgggunnnwwwuuuaaawwwvvvoooaaaooodddeeedddooo
<157058 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
157148
kaaadddooooookkkyyyiiinnnfffiiiqqqiiinnneeewwwwwwgggunnnwwwuuuaaawwwvvvoooaaaooodddeeedddooo
<157058 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
176381
aaaeeexxxbbbcccssskuuueeeoooyyysssyyyaaaeeeuuutttsssssseeeooozzziiipppaaaaaannnaaaaaadddgggt
<176291 bytes omitted>
用户输出
20
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
42229
cccuuuuuuuuuwwwaaawwwuuuzzzeeeccceeetttyyyoootttiiiwwwwwwaaasssatttuuugggmmmmmmmoaaagggdddiii
<42138 bytes omitted>
用户输出
22
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
134373
bbbyyymmmeeexxxcccmmmeeedddlllvvviiigggiiigggyyyqiiicccaaavvvcccqqqhhhsssnnnpppmaaauqqqaggga
<134283 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
110611
cccnnnyyycccnnnoookkkcccgggmmmaaaammmqqqiiiwwwkkkzzzlllqqqiiicccoooeeesssqqqzzznnnqqqcccaaam
<110521 bytes omitted>
用户输出
22
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
112771
eeeqqqjiiizzzffffaaaaqqqcccoooaaawwwdddnnnmxxxcccbbbzzzyyyeeeemmmnnnmmmpppkkkaaabbbeeeeeeooo
<112681 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
145489
ooodddxtnnnxxxwwwyyyyyyiiimmmccciiiaaauuuvvviiikkkwwwkkkaaammmqqqpppuuugggaaarrruuuiiieeemmm
<145399 bytes omitted>
用户输出
23
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
113601
xxxqqqjjjaaammmsssuuugggaaaiiiyyyaaagggoooaaaqqqhhhmmmiiimmmaaaiiiaaammmjjjvvvaaayyytttsssaa
<113511 bytes omitted>
用户输出
23
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
4322
cccsssnnnrrriiivvvtttxxxuuukkkawwwkkkeeewwwyyygggaaaiiiuuuaaawwwccccccyyyaaagggmmmqqqwwwbbbxxx
<4230 bytes omitted>
用户输出
19
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
179926
aaabbbkkkqqqjjjeeeoooaaaqqqggguuuoooyyyeeebbbooouuumaaazzzwwwuuuaaaisssccccccaaacccmmmeeeaaa
<179836 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
55461
rrrfffnnnmmmddddddwwweeemmmppppppqqqbbbkkkzzzaaavvvqqqiiiiiiiiigggaaannnooonnnrrrooogggdddmmm
<55370 bytes omitted>
用户输出
20
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
88073
ccceqqqqqquuuyyyyyybgggmmmssssssqqqccccccmmmeeennnooosssgggkkkgggaaawwwpppwwweeesssaaazzzsssn
<87982 bytes omitted>
用户输出
22
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
112713
cccmmmygggaggglllkkkqmmmhhhiiiiiitttzzzsssbgggyyyoooeeeyyygggooooooqqqcccyyyssseeemmmfffyyyu
<112623 bytes omitted>
用户输出
23
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
115313
rrrkkkiiiccckkkaaagggxxxyeeeccciiirrroooyyyuuuaaasssrrrzzzuuuaaawwwcccuuufffaaammmyyyuuuyyyp
<115223 bytes omitted>
用户输出
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0