Help me in solving RATINGINPRAC problem

My issue

Showing runtime error on 2nd task.

My code

#include <stdio.h>

void solve(){
    int N, prob[N];
	scanf("%d",&N);
	for(int i=0; i<N; i++){
	    scanf("%d ", &prob[i]);
    }
	for(int i=1; i<(N); i++){
	   if(prob[i] < prob[i-1]){
	       printf("NO\n");
	       return;
	   }
    }
	printf("YES\n");
}

int main() {
	// your code goes here
	int T;
	scanf("%d", &T);
	while(T>0){
        solve();
	    T--;
	}
	return 0;
}

Learning course: Arrays using C
Problem Link: CodeChef: Practical coding for everyone