#include #include #include #include #include #include #include using namespace std; #define int long long #define endl "\n" constexpr long long INF = (long long)1e18; constexpr long long MOD = 1'000'000'007; struct fast_io { fast_io(){ std::cin.tie(nullptr); std::ios::sync_with_stdio(false); }; } fio; signed main(){ cout<>Q; for(int _ = 0; _ < Q; _++){ int N, I, J; int a, b, c, d, e; int ans = 0; cin>>N>>I>>J; a = I; b = N - 1 - J; c = N - 1 - I; d = J; e = min(min(a, b), min(c, d)); ans = (N - e)* e; //cout<"<