Help me in solving ALTARAY problem

My issue

plz give me int

My code

#include <bits/stdc++.h>
#define ll long int
using namespace std;





int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int n;
	    vector<int>v(n);
	    for( i=0;i<n;i++){
	       cin>>v[i];
	    }
	     for(ll i=0;i<n;i++){
	        for(j=i;j<n;j++){
	             if(v[i]>0 && v[i+1]<0 && v[i+2]>0){
	                 cnt++;
	             }
	        }
	    }

	
	return 0;
}

Problem Link: ALTARAY Problem - CodeChef

@deepakjdh31
Just try to build a logic by iterating the loop from backwards .