Submission #631029

#TimeUsernameProblemLanguageResultExecution timeMemory
631029karolb2011Cards (LMIO19_korteles)Cpython 3
16 / 100
1081 ms96704 KiB
n=int(input()) c=[] t=0 for i in range(n): a=input() b=input() c.append([a,b]) for i in range(n): for j in range(i+1,n): if c[i][0]==c[j][1] or c[i][1]==c[j][0] or c[i][0][0]==c[j][0][1] and c[i][1][0]==c[j][1][1] or c[j][0][0]==c[i][0][1] and c[j][1][0]==c[i][1][1]: t+=1 print(t)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...