Runtime error, Compiler Issue

I run a submitted solution for the problem CHEFSTR1 but the compiler showing runtime error. Same issue occur during contest, my solution was showing runtime error but it was working on other IDE’s perfectly. Kindly help me.

vector array have different syntax for insertion of elements.
In array we can directly insert input value.
In vector first we need to take input in another variable and then insert it into vector.
suppose
vector v;
Need to have variable of that datatype. Let that be
int x

taking input
scanf("%d",&x);

inserting into vector
v.push_back(x);

In this video from 6:05, have explain about vector.