Where is the error?

I was trying out this problem and tried the following code in c++:

#include <bits/stdc++.h>
using namespace std;
int main() {
	// your code goes here
	int T;
	cin >> T;
	for(int i = 0; i < T; i++){
	    int N;
	    long long minX, maxX;
	    scanf("%lld",&minX);
	    scanf("%lld",&maxX);
	    int weight_bias[N][2];
	    cin >> N;
	    
	    for(int i = 0; i < N; i ++)
	    {
	        long long w_i, b_i;
	        scanf("%lld",&w_i);
	        scanf("%lld",&b_i);
	        weight_bias[i][0] = (w_i%2);
	        weight_bias[i][1] = (b_i%2);
	        
	    }
	    int k = 0;
	    for(int t = N-1; t >= 0; t--)
	    {
	        if(weight_bias[k][0] % 2 == 0){
	            k = t;
	            break;
	        }
	        
	    }
	    int tester;
	    for(int t = k; t < N; t++)
	    {
	        tester = tester + weight_bias[k][1];
	        
	    }
	    int spam = 0;
	    int nonspam = 0;
	    for(int i = minX; i <= maxX; i++)
	    {
	        if((i + tester)%2 == 0)
	        {
	            nonspam++;
	        }
	        else{spam++;}
	    }
	    cout << nonspam << " " << spam << "\n";
	    
	}
	return 0;
	
}

But I am getting wrong results.
Could anyone point out where I am wrong??
If something is not clear, please do point out.

Please format your code , ``` before code and after code.

I have formatted the code, ssrivastava990.It looks much better now. Anyways some , help??
I am kind of a newbie to c++, so need some help.

“leo_valdez” what a latin name to be from India!

One of your loops use t as variable but inside the loop you don’t use it; where it’s

if(weight_bias[k][0] % 2 == 0)

should be

if(weight_bias[t][0] % 2 == 0)

Anyway, I’d expect that you algo get TLE, the difference between minX and maxX can be up to 10^9