QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#502535 | #3259. Substring Characters | yundaehyuck | WA | 15ms | 10492kb | Python3 | 806b | 2024-08-03 09:25:04 | 2024-08-03 09:25:04 |
Judging History
answer
while 1:
try:
s = input()
p = set(s)
X = set()
n = len(s)
min_v = len(s)+10
for i in range(n):
for j in range(i,n):
if i == 0 and j >= n-1:
continue
t = s[i:j+1]
if set(t) == p:
if min_v > len(t):
min_v = len(t)
X.add(t)
count = 0
for x in X:
if len(x) == min_v:
count += 1
print(count)
except:
break
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 15ms
memory: 10492kb
input:
aabbabb abAB34aB3ba7 104001144 aaabcaaa a bb bd 1234567
output:
2 1 1 2 0 1 0 0
result:
wrong answer 3rd lines differ - expected: '3', found: '1'