stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.526055526866296x):
#include <bits/stdc++.h>

#define reg register

using namespace std;



typedef long long ll;

const int maxn = 100005;



inline ll read() {

    reg ll s = 0, t = 0; reg char ch = getchar();

    while (!isdigit(ch)) t |= ch == '-', ch = getchar();

    while (isdigit(ch)) s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();

    return t ? -s : s;

}



int n, m, a[maxn], d[maxn], x[maxn], pos[maxn], Stack[maxn], top;

ll k, ans[maxn];

bool used[maxn];



int main() {

    ios::sync_with_stdio(false);

    n = read();

    for (reg int i = 1; i <= n; i++) x[i] = read();

    for (reg int i = 1; i <= n; i++) d[i] = x[i] - x[i - 1];

    m = read(), k = read();

    for (reg int i = 1; i <= m; i++) a[i] = read();

    for (reg int i = 1; i <= n; i++) pos[i] = i;

    for (reg int i = 1; i <= m; i++) swap(pos[a[i]], pos[a[i] + 1]);

    for (reg int i = 1; i <= n; i++)

        if (!used[i]) {

            top = 0;

            for (reg int j = i; !used[j]; j = pos[j]) Stack[++top] = j, used[j] = true;

            for (reg int j = 1; j <= top; j++)

                ans[Stack[j]] = d[Stack[(k + j - 1) % top + 1]];

        }

    for (reg int i = 1; i <= n; i++) ans[i] += ans[i - 1], printf("%lld\n", ans[i]);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.434962126591458x):
#include<bits/stdc++.h>

#define ll long long

using namespace std;

const ll N=1e5+10;

ll n,m,k,p;

ll x[N],id[N],sta[N],ans[N],vis[N];

int main(){

	scanf("%lld",&n);

	for(ll i=1;i<=n;i++) scanf("%lld",&x[i]),id[i]=i;

	for(ll i=n;i>=1;i--) x[i]-=x[i-1];

	scanf("%lld%lld",&m,&k);

	for(ll i=1;i<=m;i++) scanf("%lld",&p),swap(id[p],id[p+1]);

	for(ll i=1;i<=n;i++){

		if(!vis[i]){

			ll cnt=0;

			for(ll j=i;!vis[j];j=id[j]) sta[++cnt]=j,vis[j]=1;

			for(ll j=1;j<=cnt;j++) ans[sta[j]]=x[sta[(j+k-1)%cnt+1]];

		}

	}

	for(ll i=1;i<=n;i++) ans[i]+=ans[i-1],printf("%lld.0\n",ans[i]);

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.5633809100887595x):
#include<bits/stdc++.h>

#define ll long long

using namespace std;

const ll N=1e5+10;

ll n,m,k,p;

ll x[N],id[N],sta[N],ans[N],vis[N];

int main(){

	scanf("%lld",&n);

	for(ll i=1;i<=n;i++) scanf("%lld",&x[i]),id[i]=i;

	for(ll i=n;i>=1;i--) x[i]-=x[i-1];

	scanf("%lld%lld",&m,&k);

	for(ll i=1;i<=m;i++) scanf("%lld",&p),swap(id[p],id[p+1]);

	for(ll i=1;i<=n;i++){

		if(!vis[i]){

			ll cnt=0;

			for(ll j=i;!vis[j];j=id[j]) sta[++cnt]=j,vis[j]=1;

			for(ll j=1;j<=cnt;j++) ans[sta[j]]=x[sta[(j+k-1)%cnt+1]];

		}

	}

	for(ll i=1;i<=n;i++) ans[i]+=ans[i-1],printf("%lld.0\n",ans[i]);

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.432222105402377x):
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



bool vis[100050];

ll w[100050], nxt[100050], que[100050], output[100050];



int main(){

	int n, m;

	scanf("%d", &n);

	for(int i = 1; i <= n; i++) scanf("%lld", &w[i]), nxt[i] = i;

	for(int i = n; i >= 1; i--) w[i] -= w[i-1];

	ll k;

	ll a;

	scanf("%d %lld", &m, &k);

	for(int i = 1; i <= m; i++) scanf("%lld", &a), swap(nxt[a], nxt[a+1]);

	for(int i = 1; i <= n; i++){

		if(!vis[i]) {

			int now = i, cnt = 0;

			while(!vis[now]){

				vis[now] = 1;

				que[++cnt] = now;

				now = nxt[now];

			}

			for(int j = 1; j <= cnt; j++){

				ll t = (0ll+j+k-2)%cnt+1;

				output[que[j]] = w[nxt[que[t]]];

			}

		}

	}

	ll p = 0;

	for(int i = 1; i <= n; i++) p += output[i], printf("%lld\n", p);

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.561179371739679x):
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



bool vis[100050];

ll w[100050], nxt[100050], que[100050], output[100050];



int main(){

	int n, m;

	scanf("%d", &n);

	for(int i = 1; i <= n; i++) scanf("%lld", &w[i]), nxt[i] = i;

	for(int i = n; i >= 1; i--) w[i] -= w[i-1];

	ll k;

	ll a;

	scanf("%d %lld", &m, &k);

	for(int i = 1; i <= m; i++) scanf("%lld", &a), swap(nxt[a], nxt[a+1]);

	for(int i = 1; i <= n; i++){

		if(!vis[i]) {

			int now = i, cnt = 0;

			while(!vis[now]){

				vis[now] = 1;

				que[++cnt] = now;

				now = nxt[now];

			}

			for(int j = 1; j <= cnt; j++){

				ll t = (0ll+j+k-2)%cnt+1;

				output[que[j]] = w[nxt[que[t]]];

			}

		}

	}

	ll p = 0;

	for(int i = 1; i <= n; i++) p += output[i], printf("%lld\n", p);

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.39958829852372x):
#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

const int N=1e5+7;

LL jmp,a,k,n,m,x[N],y[N],p[N],g[N],siz[N],tot,cnt,sum;

bitset <N> vis;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++)scanf("%lld",&x[i]),p[i]=i;

	for(int i=1;i<=n;i++)y[i]=x[i]-x[i-1];

	scanf("%lld%lld",&m,&k);

	for(int i=1;i<=m;i++)

	{

		scanf("%lld",&a);

		swap(p[a],p[a+1]);

	}

	for(int i=1;i<=n;i++)if(!vis[i])

	{

		++cnt;int res=i;

		while(!vis[res])

			g[res]=cnt,vis[res]=1,res=p[res],++siz[cnt];

	}

	for(int i=1;i<=n;i++)

	{

		jmp=k%siz[g[i]];

		int res=i;

		if(jmp)while(jmp--)res=p[res];

		sum+=y[res];

		printf("%lld.0\n",sum);

	}

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.534958925851835x):
#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

const int N=1e5+7;

LL jmp,a,k,n,m,x[N],y[N],p[N],g[N],siz[N],tot,cnt,sum;

bitset <N> vis;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++)scanf("%lld",&x[i]),p[i]=i;

	for(int i=1;i<=n;i++)y[i]=x[i]-x[i-1];

	scanf("%lld%lld",&m,&k);

	for(int i=1;i<=m;i++)

	{

		scanf("%lld",&a);

		swap(p[a],p[a+1]);

	}

	for(int i=1;i<=n;i++)if(!vis[i])

	{

		++cnt;int res=i;

		while(!vis[res])

			g[res]=cnt,vis[res]=1,res=p[res],++siz[cnt];

	}

	for(int i=1;i<=n;i++)

	{

		jmp=k%siz[g[i]];

		int res=i;

		if(jmp)while(jmp--)res=p[res];

		sum+=y[res];

		printf("%lld.0\n",sum);

	}

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.407848918149122x):
#include<iostream>

#include<cstdio>

#include<cstdlib>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

const int maxn = 1e6+7;

typedef long long ll;





ll n,m,pos[maxn],k,ans[maxn];

ll a[maxn],b[maxn],st[maxn];

ll move[maxn],vis[maxn];







int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++)

		scanf("%lld",&pos[i]);

	for(int i=1;i<=n;i++)

		b[i]=pos[i]-pos[i-1],a[i]=i;

	scanf("%lld%lld",&m,&k);

	for(int i=1;i<=m;i++)

	{

		ll x;

		scanf("%lld",&x);

		swap(a[x],a[x+1]);

	}

	for(int t=1;t<=n;t++)

	{

		if(vis[t])continue;

		int round = 0;

		for(int i=t;!vis[i];i=a[i])vis[i]=1,st[++round]=i;

		for(int i=1;i<=round;i++) ans[st[i]] = b[ st[(i+k-1)%round +1]];

	}

	for(int i=1;i<=n;i++)

	{

		ans[i]+=ans[i-1];

		printf("%.1lf\n",(double)ans[i]);

	}

	return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.541596126675303x):
#include<iostream>

#include<cstdio>

#include<cstdlib>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

const int maxn = 1e6+7;

typedef long long ll;





ll n,m,pos[maxn],k,ans[maxn];

ll a[maxn],b[maxn],st[maxn];

ll move[maxn],vis[maxn];







int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++)

		scanf("%lld",&pos[i]);

	for(int i=1;i<=n;i++)

		b[i]=pos[i]-pos[i-1],a[i]=i;

	scanf("%lld%lld",&m,&k);

	for(int i=1;i<=m;i++)

	{

		ll x;

		scanf("%lld",&x);

		swap(a[x],a[x+1]);

	}

	for(int t=1;t<=n;t++)

	{

		if(vis[t])continue;

		int round = 0;

		for(int i=t;!vis[i];i=a[i])vis[i]=1,st[++round]=i;

		for(int i=1;i<=round;i++) ans[st[i]] = b[ st[(i+k-1)%round +1]];

	}

	for(int i=1;i<=n;i++)

	{

		ans[i]+=ans[i-1];

		printf("%.1lf\n",(double)ans[i]);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.440131220104078x):
#include<bits/stdc++.h>

#define fo(i,l,r) for(int i=l;i<=r;i++)

#define of(i,l,r) for(int i=l;i>=r;i--)

#define fe(i,u) for(int i=head[u];i;i=e[i].next)

#define el putchar('\n')

#define ta putchar('	')

using namespace std;

typedef long long ll;

typedef pair<int,int> pii;

inline void open(const char *s)

{

	#ifndef ONLINE_JUDGE

	char str[20];

	sprintf(str,"%s.in",s);

	freopen(str,"r",stdin);

//	sprintf(str,"%s.out",s);

//	freopen(str,"w",stdout);

	#endif

}

inline ll rd()

{

	static ll x,f;

	x=0;f=1;

	char ch=getchar();

	for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;

	for(;ch>='0'&&ch<='9';ch=getchar())x=x*10+ch-'0';

	return f>0?x:-x;

}

const int N=100010;

int n,a[N],p[N],f[N];

ll b[N];

bool vis[N];



int main()

{

	n=rd();

	fo(i,1,n){

		a[i]=rd();

		b[i]=a[i]-a[i-1];

		f[i]=p[i]=i;

	}

	int m=rd();ll K=rd();

	fo(i,1,m){

		int x=rd();

		swap(p[x],p[x+1]);

	}

	fo(x,2,n)if(!vis[x]){

		int u=x;

		static vector<int>vec;

		vec.clear();

		for(;!vis[u];u=p[u])vec.push_back(u),vis[u]=1;

		int siz=vec.size();

		fo(i,0,siz-1)f[vec[i]]=vec[(i+K%siz)%siz];

	}

	ll hh=0;

	fo(i,1,n)printf("%lld.0\n",hh+=b[f[i]]);

	return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<vector>

#include<cmath>

#include<queue>

#include<map>

#include<set>

#define int long long

#define ri register int

#define max maxx

#define min minn

using namespace std;

const int N=1e5+10;

template <class T> void in(T &x) {

	x = 0;

	bool f = 0;

	char c = getchar();

	while (c < '0' || c > '9') {

		if (c == '-') f = 1;

		c = getchar();

	}

	while ('0' <= c && c <= '9') {

		x = (x << 3) + (x << 1) + (c ^ 48);

		c = getchar();

	}

	if (f) x = -x;

}

inline int maxx(int x,int y) {

	return x>y?x:y;

}

inline int minn(int x,int y) {

	return x<y?x:y;

}

inline int gcd(int x,int y) {

	return !y?x:gcd(y,x%y);

}

int l[N],cor[N],pos[N];

int a[N],dif[N],m,k,n,cnt,x;

vector<int> v[N];

inline void dfs(int x,int p) {

	l[x]=p;

	cor[x]=cnt;

	v[cnt].push_back(x);

	if(!cor[pos[x]])

		dfs(pos[x],++p);

}

signed main() {

	in(n);

	for(ri i=1; i<=n; ++i)

		in(a[i]),pos[i]=i,dif[i-1]=a[i]-a[i-1];

	in(m),in(k);

	for(ri i=1; i<=m; ++i)

		in(x),swap(pos[x],pos[x-1]);

	for(ri i=1; i<=n; i++)

		if(!l[i])

			cnt++,dfs(i,0);

	printf("%.1lf\n",(double)a[1]);

	int last=a[1];

	for(int i=1;i<n;i++)

		last+=dif[v[cor[i]][(l[i]+k)%v[cor[i]].size()]],printf("%.1lf\n",(double)last);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.567534147167131x):
#include<bits/stdc++.h>

#define fo(i,l,r) for(int i=l;i<=r;i++)

#define of(i,l,r) for(int i=l;i>=r;i--)

#define fe(i,u) for(int i=head[u];i;i=e[i].next)

#define el putchar('\n')

#define ta putchar('	')

using namespace std;

typedef long long ll;

typedef pair<int,int> pii;

inline void open(const char *s)

{

	#ifndef ONLINE_JUDGE

	char str[20];

	sprintf(str,"%s.in",s);

	freopen(str,"r",stdin);

//	sprintf(str,"%s.out",s);

//	freopen(str,"w",stdout);

	#endif

}

inline ll rd()

{

	static ll x,f;

	x=0;f=1;

	char ch=getchar();

	for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;

	for(;ch>='0'&&ch<='9';ch=getchar())x=x*10+ch-'0';

	return f>0?x:-x;

}

const int N=100010;

int n,a[N],p[N],f[N];

ll b[N];

bool vis[N];



int main()

{

	n=rd();

	fo(i,1,n){

		a[i]=rd();

		b[i]=a[i]-a[i-1];

		f[i]=p[i]=i;

	}

	int m=rd();ll K=rd();

	fo(i,1,m){

		int x=rd();

		swap(p[x],p[x+1]);

	}

	fo(x,2,n)if(!vis[x]){

		int u=x;

		static vector<int>vec;

		vec.clear();

		for(;!vis[u];u=p[u])vec.push_back(u),vis[u]=1;

		int siz=vec.size();

		fo(i,0,siz-1)f[vec[i]]=vec[(i+K%siz)%siz];

	}

	ll hh=0;

	fo(i,1,n)printf("%lld.0\n",hh+=b[f[i]]);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define N 100005

#define int long long

using namespace std;

int n,m,x[N],a[N],p[N],s[N],cnt;

long long k;

int be[N],num[N],v[N];

vector<int>q[N];

void dfs(int x,int dep)

{

    num[x]=dep;v[x]=1;be[x]=cnt;

    q[cnt].push_back(x);

    if(!v[p[x]])dfs(p[x],dep+1);

}

signed main()

{

    memset(v,0,sizeof(v));

    cin>>n;

    for(int i=1;i<=n;i++)cin>>x[i];

    for(int i=1;i<n;i++)s[i]=x[i+1]-x[i];

    cin>>m>>k;

    for(int i=1;i<n;i++)p[i]=i;

    for(int i=1;i<=m;i++){cin>>a[i];swap(p[a[i]],p[a[i]-1]);}

    for(int i=1;i<n;i++)if(!v[i])cnt++,dfs(i,0);

    cout<<x[1]<<endl;

    int now=x[1];

    for(int i=1;i<n;i++)

    {

        now+=s[q[be[i]][(num[i]+k)%q[be[i]].size()]];

        cout<<now<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.433842071819699x):
#include <iostream>

#include <cstdio>

#include <cmath>

#define rep(i,a,b) for(int i=a;i<=b;i++)

#define per(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

const int N=2e5+5;

long long a[N],n,m,k,vis[N],b[N],cnt,lop[N],ans[N],res[N];

int main(){

	scanf("%lld",&n);

	rep(i,1,n) scanf("%lld",&a[i]);

	per(i,n,1) a[i]=a[i]-a[i-1],b[i]=i;

	scanf("%lld%lld",&m,&k);

	rep(i,1,m){

		int R;

		scanf("%d",&R);

		swap(b[R],b[R+1]);

	}

	rep(i,1,n){

		if(vis[i]) continue;

		lop[cnt=1]=i;

		for(int pos=b[i];pos!=i;pos=b[pos]){

			vis[pos]=1;

			lop[++cnt]=pos;

		}

		rep(j,1,cnt) ans[lop[j]]=lop[(j+k-1)%cnt+1];

	}

	rep(i,1,n) res[i]=a[ans[i]];

	rep(i,1,n) printf("%lld.0\n",res[i]+=res[i-1]);

	return 0;

}