#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } template decltype(auto) zip(vector... args){ vector res; Int n=min({args.size()...}); res.reserve(n); for(Int i=0;i>n; auto as=read(n); auto bs=read(n); auto zs=zip(as,bs); sort(zs.begin(),zs.end()); for(Int i=0;icalc(t+i)) ans=t+i; if(t-i>=0 and calc(ans)>calc(t-i)) ans=t-i; } cout<