fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,k;
  6. cin>>n;
  7. int a[n];
  8. for(int i=0;i<n;i++){
  9. cin>>a[i];
  10. }
  11. for(int i=0;i<n;i++){
  12. cin>>a[i];
  13. }
  14. cin>>k;
  15. for(int i=0;i<n;i++){
  16. cout<<a[(i+k)%n]<<endl;
  17. }
  18. // your code goes here
  19. return 0;
  20. }
Time limit exceeded #stdin #stdout 5s 3677184KB
stdin
Standard input is empty
stdout
Standard output is empty