用陣列時會
Segmentation fault (core dumped)用vector時是
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)用vector時先預留空間
vec.reserve(n);//n為預留的大小可以參考:https://zhuanlan.zhihu.com/p/361331817