#include using namespace std; typedef long long ll; template bool chmin(T1 &a,T2 b){if(a<=b)return 0; a=b; return 1;} template bool chmax(T1 &a,T2 b){if(a>=b)return 0; a=b; return 1;} signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); int q; cin>>q; while(q--){ int n,h,w; cin>>n>>h>>w; ll ans = 0; ll k; // (k,k) <= (h,w) < (n-k,n-k); ll low = 0, up = n/2+1; while(up-low > 1){ ll mid = (low+up)/2; if(h>=mid && w>=mid && h