#include #define INF 9223372036854775807 #define mod 1000000007 #define ll long long int #define ld double #define endl '\n' #define sz 30 + 5 #define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) using namespace std; typedef pair two; ll arr[sz][sz],vis[sz][sz],dp[sz][sz],n,level = 0; queue > q; bool check(ll x, ll y){ if(x < 0 || y < 0 || x >= n || y >= n) return false; if(vis[x][y] == -1) return true; else return false; } ll bfs(ll a , ll b){ q.push(make_pair(0,0)); vis[0][0] = 0; two temp; ll i,j,x,y; while(!q.empty()){ temp = q.front(); x = temp.first; y = temp.second; //cout<>n; for(i = 1; i < n; i++) solve(i); return 0; }