When I declare vector v[10] , inside the main() function like this,
#include<bits/stdc++.h>
int main()
{
vector<int> v[10];
}
the program halts & stops responding.
But When I declare it at global, like this,
#include<bits/stdc++.h>
vector<int> v[10];
int main()
{
//something
}
It works fine.
Why ?
It works on my pc, as well as on custom test which you can check here: https://codeforces.com/problemset/customtest
It probably depends on the compiler, so try updating them (I use C++17).
Is 10 a bigger number? If so it may be possible that there aren't enough space on stack.