leetcode 2056. 棋盘上有效移动组合的数目

class Solution
{
private:
    vector> RMove= {{1,0},{-1,0},{0,1},{0,-1}};
    vector> BMove= {{1,1},{-1,-1},{-1,1},{1,-1}};
public:
    bool CheckMove(int sx, int sy, int x, int y, int step, vector>>& timeMap)
    {
        if(sx+x*step<0||sx+x*step>=8||sy+y*step<0||sy+y*step>=8)
        {
…    }
    int countCombinations(vector& pieces, vector>& positions)
    {
        vector>> timeMap(7,vector>(8,vector(8,0)));
        return Dfs(0,timeMap,pieces,positions);
    }
};

你可能感兴趣的:(leetcode,算法,职场和发展)