본문 바로가기
python-algorithm

[백준] 10812

by 무적김두칠 2021. 1. 11.

1
2
3
4
5
6
7
import sys
n,m=map(int,sys.stdin.readline().split())
tmp=[i+1 for i in range (n)]
for _ in range(m):
    begin,end,mid=map(int,sys.stdin.readline().split())
    tmp[begin-1:end]=tmp[mid-1:end]+tmp[begin-1:mid-1]
print(*tmp)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 10820  (0) 2021.01.11
[백준] 10813  (0) 2021.01.11
[백준] 10811  (0) 2021.01.11
[백준] 10810  (0) 2021.01.11
[백준] 10809  (0) 2021.01.11

댓글