#include <bits/stdc++.h>
using namespace std;
long long a[114514], b, c, d=9999999999999999999999999999, e, f, g, h;
int main() {
cin >> b;
for (int i = 1; i <= b; i++) {
cin >> a[i];
if (a[i] >= c) {
c = a[i];
}
}
for (int i = 1; i <= b; i++) {
if (a[i] <= d) {
d = a[i];
}
}
for (int i = 1; i <= d; i++) {
cout << c - a[i] << " ";
}
cout << endl;
for (int i = 1; i <= d; i++) {
cout << a[i] - d << " ";
}
return 0;
}
样例都没过,有关