QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#631475 | #5666. Repetitive Elements | vwxyz | WA | 8ms | 10728kb | Python3 | 352b | 2024-10-12 06:12:12 | 2024-10-12 06:12:13 |
Judging History
answer
from collections import defaultdict
T=int(input())
ans=None
for t in range(T):
S=input()
N=len(S)
for d in range(1,N+1):
idx=defaultdict(list)
for i in range(N-d+1):
idx[S[i:i+d]].append(i)
for s,lst in idx.items():
if max(lst)-min(lst)>=d:
ans=s
print(ans)
详细
Test #1:
score: 0
Wrong Answer
time: 8ms
memory: 10728kb
input:
5 TATCGATCGAGTTGT TCCGCGAGCGAGTCTCTCCATT GTTTCATCATACGAGGCCCCATACGCGCTGG AGATGGGATCCTTATG GCCCTTAGGCATGGGATGTCGTTTCTTG
output:
TCGA CGAG CATACG ATG ATG
result:
wrong answer 1st lines differ - expected: 'ATCG', found: 'TCGA'