cf 1435 A
把每个数从1到n倒序输出pow(-1,i)*a[n-i+1]
#include<bits/stdc++.h>
#include<algorithm>
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<string>
#include<utility>
#include<stack>
#include<queue>
#include<vector>
//#pragma GCC optimize(3)
//#pragma GCC optimize(2)
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
#define inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
const int maxn = 1000010;
const int mod = 1e9 + 7;
ll i, j, t, k, l, r;
ll ans, sum, cnt, sum1, sum2, num;
ll a[maxn], b[maxn], vis[maxn], lsh[maxn];
ll flag = 0, n, m, x, y, c, q;
vector<vector <vector <vector <int> > > >dp(71,vector<vector<vector<int>>>(71,vector<vector<int>>(71,vector<int>(35,-1))));
vector< vector<int> >mp(70,vector<int >(70));
template <typename T>
void read(T& x) /*快读*/
{
x = 0;
int f = 1;
char ch = getchar();
while (!isdigit(ch))
{
if (ch == '-')
f = -1;
ch = getchar();
}
while (isdigit(ch))
{
x = x * 10 + (ch ^ 48);
ch = getchar();
}
x *= f;
return;
}
int main()
{
cin>>t;
while(t--)
{
read(n);
rep(i,1,n)
cin>>a[i];
ll mid=n/2;
rep(i,1,n)
{
ans=pow(-1,i);
b[i]=ans*a[n-i+1];
cout<<b[i]<<" ";
}
cout<<endl;
}
return 0;
}