#include using namespace std; #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for(int i=0; ib ? a=b, true : false; } using ll=long long; const int INF=1e9+10; const ll INFL=4e18; #ifdef DEBUG #include "./debug.hpp" #else #define debug(...) #define print_line #endif //---------------------------------------------------------- void solve() { ll A,B,C,X,Y,Z; cin>>A>>B>>C>>X>>Y>>Z; auto f=[&](ll x) { return abs(A-x)*X+abs(B-x)*Y+abs(C-x)*Z; }; cout<>T; while(T--) solve(); }