Submission #591620

# Submission time Handle Problem Language Result Execution time Memory
591620 2022-07-07T17:04:38 Z Baartifispa Cards (LMIO19_korteles) Python 3
16 / 100
1000 ms 35504 KB
ilosc = int(input())
tab = []
d = 0
wynik = 0
for i in range(ilosc):    
    a = input()
    b = input()
    tab.append(a+b)
    
for i in range(ilosc):
    for y in range(i+1,ilosc): 
        if tab[i][0] == tab[y][2] and tab[i][1] == tab[y+d][3]:
            wynik += 1
            
        else:
            if tab[i][1] == tab[y][0] and tab[i][3] == tab[y][2]:
                    wynik += 1
                    
            else:
                if tab[i][2] == tab[y][0] and tab[i][3] == tab[y][1]:
                    wynik += 1
                    
                else:
                    if tab[i][0] == tab[y][1] and tab[i][2] == tab[y][3]:
                        wynik += 1
print(wynik)
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2900 KB Output is correct
2 Correct 13 ms 2900 KB Output is correct
3 Correct 18 ms 2892 KB Output is correct
4 Correct 18 ms 2888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2900 KB Output is correct
2 Correct 13 ms 2900 KB Output is correct
3 Correct 18 ms 2892 KB Output is correct
4 Correct 18 ms 2888 KB Output is correct
5 Correct 13 ms 2900 KB Output is correct
6 Correct 174 ms 2900 KB Output is correct
7 Execution timed out 1027 ms 2900 KB Time limit exceeded
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1071 ms 35504 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 16 ms 2780 KB Output is correct
2 Execution timed out 1098 ms 6484 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 13 ms 2900 KB Output is correct
2 Correct 174 ms 2900 KB Output is correct
3 Execution timed out 1027 ms 2900 KB Time limit exceeded
4 Halted 0 ms 0 KB -