Help me in solving SEARCHINARR problem

Having run time error

My code

#include <stdio.h>

int main() {
	// your code goes here
	int n,s;
	int a[100]={} ;
	int count=0;
	
	
	scanf ("%d%d",&n,&s);
	for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        
    }
    
    for(int i=0;i<n;i++){
        if(a[i]==s){
            count=count+1;
        }
        
    }
    
    if(count>=1) {
        printf ("YES ");
            
    }
    else {
        printf ("NO ");
            
    }

}


Learning course: BCS301: Data structures
Problem Link: https://www.codechef.com/learn/course/abesit-dsa/ABESITDS06/problems/SEARCHINARR