Submission #19485351


Source Code Expand

Copy
n=int(input())
#a=list(map(str,input().split()))

#a,b = map(int,input().split())
s=input()
#d=[int(input()) for i in range(n)]
#a=list(map(int,input().split()))

l=0
for i in range(n-1):
    u=[]
    for x in s[:i+1]:
        for y in s[i+1:]:
            if ((x==y) and (x not in u)):
                u.append(x)
    l=max(l,len(u))
print(l)

Submission Info

Submission Time
Task B - Cut and Count
User yuta316
Language PyPy3 (7.3.0)
Score 200
Code Size 359 Byte
Status AC
Exec Time 74 ms
Memory 67260 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 25
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_16.txt, subtask_1_17.txt, subtask_1_18.txt, subtask_1_19.txt
Case Name Status Exec Time Memory
sample_01.txt AC 74 ms 61372 KB
sample_02.txt AC 49 ms 61100 KB
sample_03.txt AC 55 ms 65328 KB
subtask_1_01.txt AC 51 ms 60912 KB
subtask_1_02.txt AC 55 ms 63976 KB
subtask_1_03.txt AC 58 ms 65240 KB
subtask_1_04.txt AC 56 ms 63868 KB
subtask_1_05.txt AC 55 ms 63688 KB
subtask_1_06.txt AC 55 ms 62600 KB
subtask_1_07.txt AC 56 ms 66756 KB
subtask_1_08.txt AC 65 ms 67260 KB
subtask_1_09.txt AC 61 ms 67096 KB
subtask_1_10.txt AC 57 ms 63752 KB
subtask_1_11.txt AC 51 ms 63768 KB
subtask_1_12.txt AC 54 ms 63324 KB
subtask_1_13.txt AC 65 ms 67240 KB
subtask_1_14.txt AC 63 ms 67028 KB
subtask_1_15.txt AC 65 ms 67204 KB
subtask_1_16.txt AC 63 ms 67188 KB
subtask_1_17.txt AC 64 ms 67156 KB
subtask_1_18.txt AC 63 ms 66932 KB
subtask_1_19.txt AC 58 ms 63300 KB