This should be enough to get AC without thinking
vector<vector<int64_t>> sequence = {
{1,1,1,1,1,1,1,1,1,1,1,1},
{1,0,2,0,4,0,8,0,16,0,32,0},
{1,2,6,14,37,92,236,596,1517,3846,9770,24794}, // next is 62953
{1,0,14,0,154,0,1696,0,18684,0,205832,0}, // next is 2267544
};
The solution is a linear recurrence. Output is multiplied by 2.
Edited by author 16.01.2020 16:32