about summary refs log tree commit diff
path: root/others/153x/061.py
blob: 1535ff923170ac42fbc998ab9169d148d18a1925 (plain) (blame)
1
2
3
4
5
6
7
#!/usr/bin/env python3
from collections import deque
with open('CLIST.INP') as fi, open('CLIST.OUT', 'w') as fo:
    n, k, l = map(int, fi.readline().split())
    d = deque(map(int, fi.readline().split()))
    d.rotate(int(fi.read()) * (l - k) % n)
    print(*d, file=fo)