摘要:
本题我们要快速的判断一个点在拓扑序中是不是另一个点的前驱,先求出拓扑序,在利用二进制代表集合来进行前驱的判断。 class Solution { public: const static int N = 110, M = N * N; int h[N], e[M], ne[M], idx; int 阅读全文
posted @ 2023-09-13 09:56
深渊之巅
阅读(26)
评论(0)
推荐(0)
摘要:
本题是简单的模拟,但是对于多维数据的表示(x, y)本题更想探究一下array和tuple之间的区别。 array版本 class Solution { public: bool checkValidGrid(vector<vector<int>>& grid) { if(grid[0][0]) r 阅读全文
posted @ 2023-09-13 09:53
深渊之巅
阅读(18)
评论(0)
推荐(0)

浙公网安备 33010602011771号