이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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)
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |