>>816 #include <stdio.h>
int f(int *p, int n, int size)
{
int i, s, l;
if(n <=1 || size-2<=n) return 0;
for(i=s=l=0; i<n; i++) {
if(p[i] > p[n]) l++;
else if(p[i] < p[n]) s++;
}
if(s==0 || l==0) return 0;
for(i=n+1, s=l=0; i<size; i++) {
if(p[i] > p[n]) l++;
else if(p[i] < p[n]) s++;
}
return s && l;
}
int main(void)
{
int i, a[] = {4,8,2,1,7,9,3,5,6};
for(i=0; i<sizeof a / sizeof *a; i++) if(f(a, i, sizeof a / sizeof *a)) printf("%d\n", a[i]);
return 0;
}