#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int tc; cin >> tc; while(tc--) { int n,t; cin >> n; vector v; long long int res = 0; for(int i=0;i> t; v.push_back(t); } for(int i=0;i<3;i++) { vector dp(n+1,-1); dp[0] = 0; for(int i=0;i