#include<bits/stdc++.h>
#include "vision.h"
using namespace std;


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

int getMove1d(vector<int> v)
{


    return 0;
}

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

pair<int, int>getMove2d(vector<vector<int>> v)
{
    long long firstans=0;
    long long secondans=0;

    long long x3=0;
    long long y3=0;

    for (long long i=0; i<v.size(); i++)
    {
        for (long long j=0; j<v[i].size(); j++)
        {
            if (v[i][j]==3)
            {
                x3=i;
                y3=j;
            }
        }
    }

    if (v[x3][(y3+1)%v.size()]==1)
    {
        secondans=v.size()-1;
    }

    if (v[(x3+1)%v.size()][y3]==1)
    {
        firstans=v.size()-1;
    }


    return {firstans, secondans};
}
