This is so stupid its funny
Code\ngolang []\ntype Item struct {\n\ti int\n    j int\n\tpriority int\n\tindex int\n}\n\ntype PriorityQueue []*Item\n\nfunc (pq PriorityQueue) Len() int { ret
# Code\n```golang []\ntype Item struct {\n\ti int\n    j int\n\tpriority int\n\tindex int\n}\n\ntype PriorityQueue []*Item\n\nfunc (pq PriorityQueue) Len() int { return len(pq) }\n\nfunc (pq PriorityQueue) Less(i, j int) bool {\n\treturn pq[i].priority < pq[j].priority\n}\n\nfunc (pq PriorityQueue) Swap(i, j int) {\n\tpq[i], pq[j] = pq[j], pq[i]\n\tpq[i].index = i\n\tpq[j].index = j\n}\n\nfunc (pq *PriorityQueue) Push(x any) {\n\tn := len(*pq)\n\titem := x.(*Item)\n\titem.index = n\n\t*pq = append(*pq, item)\n}\n\nfunc (pq *PriorityQueue) Pop() any {\n\told := *pq\n\tn := len(old)\n\titem := old[n-1]\n\told[n-1] = nil  // avoid memory leak\n\titem.index = -1 // for safety\n\t*pq = old[0 : n-1]\n\treturn item\n}\n\nfunc offset(a int, b int) int {\n    if a%2 != b%2 {\n        return 1\n    }\n    return 0\n}\n\nfunc minimumTime(grid [][]int) int {\n    vis := make([][]bool, len(grid))\n    for i:=0; i<len(vis); i++ {\n        vis[i] = make([]bool, len(grid[0]))\n    }\n\n    pq := make(PriorityQueue, 0)\n    heap.Init(&pq)\n    heap.Push(&pq, &Item{i: 0, j: 0, priority: 0})\n\n    for len(pq) > 0 {\n        s := heap.Pop(&pq).(*Item)\n        i := s.i\n        j := s.j\n        if vis[i][j] {\n            continue\n        }\n        vis[i][j] = true\n\n        if i == len(grid)-1 && j == len(grid[0])-1 {\n            return s.priority\n        }\n\n        if (i-1>=0 && s.priority + 1 >= grid[i-1][j]) || (i+1<len(grid) && s.priority + 1 >= grid[i+1][j]) || (j-1>=0 && s.priority + 1 >= grid[i][j-1]) || (j+1<len(grid[0]) && s.priority + 1 >= grid[i][j+1]) {\n            if i-1>=0 {\n                heap.Push(&pq, &Item{i: i-1, j: j, priority: max(s.priority+1, grid[i-1][j]+offset(grid[i-1][j], s.priority+1))})\n            }\n            if i+1 < len(grid) {\n                heap.Push(&pq, &Item{i: i+1, j: j, priority: max(s.priority+1, grid[i+1][j]+offset(grid[i+1][j], s.priority+1))})\n            }\n            if j-1>=0 {\n                heap.Push(&pq, &Item{i: i, j: j-1, priority: max(s.priority+1, grid[i][j-1]+offset(grid[i][j-1], s.priority+1))})\n            }\n            if j+1 < len(grid[0]) {\n                heap.Push(&pq, &Item{i: i, j: j+1, priority: max(s.priority+1, grid[i][j+1]+offset(grid[i][j+1], s.priority+1))})\n            }\n        }\n\n    }\n\n    return -1\n}\n```
['Go']