Can't figure out the SIGFPE error. I tried the code using Structures

#include<bits/stdc++.h>
using namespace std;

int maximum(int a, int b)
{
return (a>b) ? a : b;
}

struct restaurant
{
int shops;
int people;
int price;
};

int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);

int test;
cin>>test;

while(test--)
{
	int N;
	cin>>N;
	
   
	struct restaurant rest[N];
	for(int i=0;i<N;i++)
	{
		cin>>rest[i].shops>>rest[i].people>>rest[i].price;
	}
	int arr[N];
	int max=0;
	for(int i=0;i<N;i++)
	{
		if((rest[i].people)%((rest[i].shops)+1)==0)
		{
			arr[i]=(rest[i].people)/((rest[i].shops)+1)*(rest[i].price);
			max= maximum(arr[i],max);
		}
		
		else
		{
			arr[i]=(rest[i].people)/((rest[i].shops)+1)*(rest[i].price);
			max=maximum(arr[i],max);
		}
	}
	
	cout<<max<<"\n";
}

return 0;

}

Are you running it without custom input? Submitting your code gives AC.

The code is working fine with custom inputs. Error is encountered when I try to run it without the custom inputs. I submitted the code and it gives AC but still curious about why is this occurring.

Running it without custom input does not run it on the sample testcase. It runs on empty input instead.

Got it. Thank You!