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

using namespace std;
std::vector<int> getVisionPattern1d()
{
    vector<int> pattern;
    pattern.push_back(3);pattern.push_back(1);
    pattern.push_back(1);pattern.push_back(2);
    return pattern;
}

int getMove1d(std::vector<int> v)
{
    int len=(int)v.size();
    if (v[len/2]==3)
    {
        if (v[len/2-1]==1) return len/2-1;
        else return len/2+1;
    }
    if (v[len/2]==2)
    {
        if (v[len/2-1]==3) return len/2-1;
        else return len/2+1;
    }
    int pre=v[len/2-1],posle=v[len/2+1];
    if (pre==3 and posle==1) return len/2-1;
    else if (posle==3 and pre==1) return len/2+1;
    else if (pre==1 and posle==2) return len/2+1;
    else return len/2-1;
}

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

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