#include using namespace std; #define endl '\n' #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define F(i,j,k) fill(i[0],i[0]+j*j,k) #define P(p) cout<<(p)<()) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define INF 1<<30 #define v(T) vector #define vv(T) v(v(T)) #define print(x) cout<<(x)<> v[i] typedef vector vi; typedef vector vl; typedef vector vd; typedef pair pii; typedef pair pll; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b void debug_print(Head&& head, Tail&&... tail) { cout << (head) << endl; debug_print(forward(tail)...); } int i, j, k; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; vi xs; vi ys; rep(i, N) { int t; cin >> t; xs.push_back(t); } rep(i, N) { int t; cin >> t; ys.push_back(t); } int R = INF; rep(i, N) { R = min(xs[i] + ys[i], R); } print(R); print(0); rep(i,N) { print(max(0, R - ys[i])); } print(R); // write something. return 0; }