📅  最后修改于: 2022-03-11 14:44:55.044000             🧑  作者: Mango
// Convert integer to vector of digits
vector int_to_vector(long long n) {
vector vec;
while (n != 0) {
vec.push_back(n%10);
n /= 10;
}
reverse(vec.begin(), vec.end());
return vec;
}