So, here are the differences, and I will let you decide what is best for your situation.
v.clear();
v.resize(3, 1);
. - , , 100 ( , , 100 ). 3 1. reset 3 , - .
v = vector<int>(3, 1);
, , , , 0, 3 , , , memcpy 3 . , v, - 100 .
vector<int>(3, 1).swap(v);
. , , 1. , 100 , , . . , , . , , , ( v ) , , .
.