Help me in solving SILLYPRS problem

My issue

My code

#include <stdio.h>

int main(void) {
	// your code goes here
	long long int t, n, i, occ, ocec, sum, z;
	scanf("%lld", &t);
	while(t--){
	    scanf("%lld", &n);
	    occ=0; ocec=0; sum=0;
	    for(i=0; i<n; i++){
	        scanf("%d", &z);
	        sum+=z;
	        if(z%2)
	            occ++;
	    }
	    while(n--){
	        scanf("%lld", &z);
	        sum+=z;
	        if(z%2)
	            ocec++;
	    }
	    
	    z=abs(occ-ocec);
	    printf("%d\n", (sum-z)/2);
	}
	return 0;
}


Problem Link: SILLYPRS Problem - CodeChef