For this Question: Stickler the thief wants to loot money from a society having n houses in a single line. He is a weird person and follows a certain rule when looting the houses. According to the rule, he will never loot two consecutive houses. At the same time, he wants to maximise the amount he loots. The thief knows which house has what amount of money but is unable to come up with an optimal looting strategy. He asks for your help to find the maximum money he can get if he strictly follows the rule. Each house has a[i] amount of money present in it.The first line of input contains an integer T denoting the number of test cases. T testcases follow. Each test case contains an integer n which denotes the number of houses. Next line contains space separated numbers denoting the amount of money in each house.

1 <= T <= 100
1 <= n <= 10^4
1 <= a[i] <= 10^4For each testcase, in a newline, print an integer which denotes the maximum amount he can take home.Sample Input:
2
6
5 5 10 100 10 5
3
1 2 3

Sample Output:
110
4

Explanation:
Testcase1:
5 + 100 + 5 = 110
Testcase2:
1 + 3 = 4, I have written this Solution Code: #include<bits/stdc++.h>
#define int         long long
#define ld          long double
#define ll          long long
#define pb          push_back
#define endl        '\n'
#define pi          pair<int,int>
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define fi          first
#define se          second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define dep(i,a,b)  for(int i=a;i>=b;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
using namespace std;

const int N = 1e4 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int a[N], dp[N][2];

void solve(){
    int n;  cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
        dp[i][0] = max(dp[i-1][1], dp[i-1][0]);
        dp[i][1] = a[i] + dp[i-1][0];
    }
    cout << max(dp[n][1], dp[n][0]) << endl;
}

void testcases(){
    int tt = 1; 
    cin >> tt;
    while(tt--){
        solve();
    }
}


signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

 		clock_t start = clock();
 	

    testcases();


 		cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms: ";
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?