For this Question: Given an array A of N positive integers. The task is to find a subsequence with maximum sum such that there should be no adjacent elements from the array in the subsequence.First line of input contains T, the number of test case.
First line of test case contains size of array N. Next line contains N space separated integers representing the elements of the array.

Constraints:
1 <= T <= 100
1 <= N <= 10^5
1 <= A[i] <= 10^6

<b>Sum of N over all testcases does not exceed 10^6</b>For each testcase, print the maximum sum of the subsequenceSample Input:-
2
3
1 2 3
3
1 20 3

Sample Output:-
4
20

Explanation:
Testcase 1: Elements 1 and 3 form a subsequence with maximum sum and no elements in the subsequence are adjacent in the array.
Testcase 2: Element 20 from the array forms a subsequence with maximum sum., I have written this Solution Code: #include "bits/stdc++.h"
#pragma GCC optimize "03"
using namespace std;
 
#define int long long int
#define ld long double
#define pi pair<int, int>
#define pb push_back
#define fi first
#define se second
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif
 
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int dp[N][2];

signed main() {
	IOS;
	int t;	cin >> t;
	while(t--){
		memset(dp, 0, sizeof dp);
		int n;	cin >> n;
		for(int i = 1; i <= n; i++){
			int p;	cin >> p;
			dp[i][1] = p + dp[i-1][0];
			dp[i][0] = max(dp[i-1][0], dp[i-1][1]);
		}	
		cout << max(dp[n][0], dp[n][1]) << endl;;
	}
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?