Submission #162023

# Submission time Handle Problem Language Result Execution time Memory
162023 2019-11-05T23:19:32 Z itiam COCI17_cezar (COCI17_cezar) Python 3
0 / 50
27 ms 3512 KB
n=int(input())

r=[]
for i in range(n):
    r.append(str(input()))

# result - output - broj substringova koji su lozinka
result=0

def get_all_substrings(input_string):
  length = len(input_string)
  ret_list=[]
  for i in range(length):
    for j in range(i,length):
        if ret_list.count(input_string[i:j+1])==0:
            ret_list.append(input_string[i:j+1])
  return ret_list

for s in r:
    sub_list=get_all_substrings(s)
    for sub in sub_list:
        result+=r.count(sub)
    #element liste je sam sebi podstring pa se oduzima -1
    result-=1


print (result)
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 3512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3272 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3300 KB Output isn't correct
2 Halted 0 ms 0 KB -