PERMSUFF august cookoff 2014

why is my submission not accepted…

#include
#include
#include
#define s(a) scanf("%lld" , &a)
#define pp printf(“Possible\n”)
#define pi printf(“Impossible\n”)

using namespace std;

int main()
{

long long int t, n, m, i,j, c = 1, l, r , f = 0,k ,min = 1000000, f2 = 0;
s(t);

while(t--) {		
	s(n);
	s(m);	

	vector <long long int> a(n+1,0);
	vector <long long int> b(n+1,0);

	for (i = 1; i <= n; i++) {
		s(k);
		a[i] = k;
	}

	for (i = 1; i <= m; i++) {
		s(l);
		s(r);
			
			for (j = l; j <= r; j++) {
				if((b[j] < min) && (b[j] > 0)) {
					min = b[j];		
				}
				
				if(b[j] > 0) {
					f2 = 1;
				}
			}
			
			if (f2 == 1) {
				for (j = l; j <= r; j++) {
					b[j] = min;
				}
			} else {
				for (j = l; j <= r; j++) {
					b[j] = c;
				}
				c++;
			}
	}
	
	for (i = 1; i <= n; i++) {
		if(b[a[i]] != b[i]) {
			f = 1;
		}
	}

	if(f == 1) {
		pi;
	} else {
		pp;
	}
	
	f2 = 0;
	f = 0;		
	c = 1;
	min = 10000000;
}			

return 0;

}

//