该程序感觉没有问题,但是为什么在acm中得不了满分?

#include<stdio.h>
int main()
{
    int i,j,m=0;
    int N,X,temp;
     int static a[100000][3];
     int static b[100000];
    scanf("%d",&N);
    for(i=0;i<N;i++){
        for(j=0;j<3;j++){
            scanf("%d",&a[i][j]);
        }
    }
    b[0]=-1;
    for(i=0;i<N;i++){
        X=a[i][2]-a[i][0];
        if(X>0){
            b[m]=a[i][1];
            m++;
        }
        else if(X<=0){
            continue;
        }
    }
    for(i=0;i<m;i++){
        for(j=0;j<m-1;j++){
            if(b[j]>b[j+1]){
                temp=b[j];
                b[j]=b[j+1];
                b[j+1]=temp;
            }
        }
    }
    printf("%d",b[0]);
    return 0;
}

把 else if (X <= 0) 换成 else 试试