#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define ll long long
vector<int>getVisionPattern1d(){
    return{1,1,2,3};
}

int getMove1d(vector<int>v){
    int c=v.size()/2;
    if(c==1){
        int mx=0;
        for(auto i:v)mx=max(mx,i);
        if(mx==2)for(int i=0;i<v.size();i++)if(v[i]==2)return i;
        if(v[c+1]==1)return c+1;
        else return c-1;
    }
    else if(c==2){
        for(int i=0;i<v.size();i++)if(v[i]==3)return i;
    }
    else{
        int ind=-1;
        for(int i=0;i<v.size();i++)if(v[i]==2)ind=i;
        if(ind<c)return c+1;
        else return c-1;
    }
}

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

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