QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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)
Details
Tip: Click on the bar to expand more detailed information
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'