#include #include #include #include #include #include #include using namespace std; int main() { int n;cin>>n; vector> dp(n,vector(n,-1)); vector> tate(n,vector(4,false)); vector> yoko(n,vector(4,false)); for(int i=0;i