답안 #591612

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
591612 2022-07-07T16:54:13 Z Baartifispa Cards (LMIO19_korteles) Python 3
16 / 100
1000 ms 42332 KB
ilosc = int(input())
tab = []
d = 0
wynik = 0
for i in range(ilosc):    
    a = input()
    b = input()
    tab.append([])
    tab[-1].append(a[0])
    tab[-1].append(a[1])
    tab[-1].append(b[0])
    tab[-1].append(b[1])

#print(tab)
for i in range(ilosc):
    for y in range(i+1,ilosc):
#        print(i, y)
#        if (tab[i][0] == tab[y][2] and tab[i][1] == tab[y+d][3]) \
#           or (tab[i][1] == tab[y][0] and tab[i][3] == tab[y][2])\
#           or (tab[i][2] == tab[y][0] and tab[i][3] == tab[y][1])\
#           or (tab[i][0] == tab[y][1] and tab[i][2] == tab[y][3]):
#            wynik += 1
#
        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)
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 3028 KB Output is correct
2 Correct 20 ms 2904 KB Output is correct
3 Correct 16 ms 2844 KB Output is correct
4 Correct 17 ms 2860 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 3028 KB Output is correct
2 Correct 20 ms 2904 KB Output is correct
3 Correct 16 ms 2844 KB Output is correct
4 Correct 17 ms 2860 KB Output is correct
5 Correct 14 ms 2896 KB Output is correct
6 Correct 146 ms 2868 KB Output is correct
7 Execution timed out 1069 ms 3040 KB Time limit exceeded
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1070 ms 42332 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 2900 KB Output is correct
2 Execution timed out 1085 ms 8352 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 2896 KB Output is correct
2 Correct 146 ms 2868 KB Output is correct
3 Execution timed out 1069 ms 3040 KB Time limit exceeded
4 Halted 0 ms 0 KB -