mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1371.cpp
This commit is contained in:
parent
f0da649615
commit
6d98e3d42c
25
QUSTOJ/1371.cpp
Normal file
25
QUSTOJ/1371.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include <cstdio>
|
||||
const int MAXN = 1024;
|
||||
int p[MAXN];
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
scanf("%d",&p[i]);
|
||||
}
|
||||
int m;
|
||||
scanf("%d",&m);
|
||||
m=m%n;
|
||||
for(int i=n-m;i<n;i++)
|
||||
{
|
||||
printf("%d ",p[i]);
|
||||
}
|
||||
for(int i=0;i<n-m;i++)
|
||||
{
|
||||
printf("%d ",p[i]);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user