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.
vector v;
Need to have variable of that datatype. Let that be
int x

taking input

inserting into vector

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