boj step 4 rework
This commit is contained in:
7
zeta_python/completed/10811.py
Normal file
7
zeta_python/completed/10811.py
Normal file
@@ -0,0 +1,7 @@
|
||||
N, M = map(int, input().split())
|
||||
L = [i + 1 for i in range(N)]
|
||||
for _ in range(M):
|
||||
i, j = map(int, input().split())
|
||||
L[i - 1:j] = reversed(L[i - 1:j])
|
||||
|
||||
print(" ".join(map(str, L)))
|
||||
Reference in New Issue
Block a user