Skip to content

Commit 06147d1

Browse files
committed
comments
1 parent bdef5d6 commit 06147d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CCC Answers/ccc18s2.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# https://dmoj.ca/problem/ccc18s2
22
# Kevin Lu
33

4+
# inputs
45
grid = [[int(n) for n in input().split()] for _ in range(int(input()))]
56
FIX_HORI = grid[0][0] > grid[0][1]
67
FIX_VERT = grid[0][0] > grid[1][0]
78

9+
# processing
810
if FIX_HORI and FIX_VERT:
911
grid = [row[::-1] for row in grid[::-1]]
1012
elif not FIX_HORI and FIX_VERT:
1113
grid = [row for row in grid[::-1]]
1214
elif FIX_HORI and not FIX_VERT:
1315
grid = [row[::-1] for row in grid]
1416

17+
# output
1518
[print(' '.join(map(str, row))) for row in grid]
1619

1720
"""

0 commit comments

Comments
 (0)