#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

std::vector<int> getVisionPattern1d()
{
    return {1, 1, 3, 1, 2, 2};
}

int getMove1d(std::vector<int> vec)
{
    ll amount = (ll)vec.size();
    ll cur = vec[amount/2];
    if(cur == 1)
    {
        if(vec[0] == 2) return amount-1;
        if(vec.back() == 2) return 0;
        if(vec.back() == 3) return amount-1;
        else return 0;
    }
    else if(cur == 2)
    {
        if(vec[0] == 3)
        {
            return amount-1;
        }
        else if(vec.back() == 3)
        {
            return 0;
        }
        else if(vec[1] == 2)
        {
            return amount-1;
        }
        else
        {
            return 0;
        }
    }
    else
    {
        if(vec[amount-2] == 2) return amount-1;
        else return 0;
    }
}

std::vector<std::vector<int>> getVisionPattern2d()
{
    return {{1}};
}

std::pair<int, int> getMove2d(std::vector<std::vector<int>> v)
{
    return {0, 0};
}
