Submission #631029

# Submission time Handle Problem Language Result Execution time Memory
631029 2022-08-17T15:10:16 Z karolb2011 Cards (LMIO19_korteles) Python 3
16 / 100
1000 ms 96704 KB
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 time Memory Grader output
1 Correct 12 ms 2840 KB Output is correct
2 Correct 14 ms 2856 KB Output is correct
3 Correct 17 ms 2904 KB Output is correct
4 Correct 19 ms 2772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 2840 KB Output is correct
2 Correct 14 ms 2856 KB Output is correct
3 Correct 17 ms 2904 KB Output is correct
4 Correct 19 ms 2772 KB Output is correct
5 Correct 14 ms 2824 KB Output is correct
6 Correct 170 ms 2960 KB Output is correct
7 Execution timed out 1070 ms 3116 KB Time limit exceeded
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1050 ms 96704 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2772 KB Output is correct
2 Execution timed out 1081 ms 13992 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 14 ms 2824 KB Output is correct
2 Correct 170 ms 2960 KB Output is correct
3 Execution timed out 1070 ms 3116 KB Time limit exceeded
4 Halted 0 ms 0 KB -