You are viewing a single comment's thread. Return to all comments →
Another simple python solution
#!/bin/python import sys n,k,q = raw_input().strip().split(' ') n,k,q = [int(n),int(k),int(q)] a = map(int,raw_input().strip().split(' ')) a = a[n-(k%n):n]+a[0:n-(k%n)] for a0 in xrange(q): m = int(raw_input().strip()) print a[m]
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
Another simple python solution