// Convert vector of digits to integer
long long vector_to_int(vector<int> num) {
long long n = 0;
int N = num.size();
for (int i = 0; i < N; i++) {
n += num[i]*pow(10, N-i-1);
}
return n;
}
// Convert integer to vector of digits
vector<int> int_to_vector(long long n) {
vector<int> vec;
while (n != 0) {
vec.push_back(n%10);
n /= 10;
}
reverse(vec.begin(), vec.end());
return vec;
}