📅  最后修改于: 2022-03-11 14:44:52.383000             🧑  作者: 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;
}