This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#import<cstdio>
int n,a[50],b[50],i,j;main(){scanf("%d",&n);for(i=0;i<n;)scanf("%d",a+i++);for(i=0;i<n;){while(b[j])j=(j+1)%n;b[j]=a[i];j=(j+a[i++])%n;}printf("%d\n",n);for(i=0;i<n;)printf("%d ",b[i++]);}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |