Submission #24956

#TimeUsernameProblemLanguageResultExecution timeMemory
24956leejseo구간 성분 (KOI15_interval)Cpython 2
0 / 100
1083 ms41 KiB
def solve(A, B): n = len(A) m = len(B) common = 0 L = [] M = [] for i in range(n): for j in range(i+1, n): s = A[i:j] u = [] for k in s: u.append(k) u.sort() L.append(u) for i in range(m): for j in range(i+1, m): s = B[i:j] u = [] for k in s: u.append(k) u.sort() M.append(u) for i in L: for j in M: if i == j and common < len(i): common = len(i) return common def main(): A = raw_input() B = raw_input() print solve(A, B) return main()
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...