#include<iostream> #include<iomanip> #include<cmath> using namespace std; typedef long long ll; int main() { int t; cin >> t; while (t--) { int n, a, b, c, d; cin >>n>>...