当前位置:
首页 >
行业知识 >
LeetCode报错信息:==22==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x502000000100 at pc 0x5
行业知识
LeetCode报错信息:==22==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x502000000100 at pc 0x5
2026-11-29 23:13:17
来源:互联网转载
错误情况(一)
报错信息
在�index.php/tags-41973.html" >��刷37.解数独时,写了如下代码,
()class Solution {public: // 根据题意,需要三个状态数组 bool row[9][9] = {}; bool column[9][9] = {}; bool matrix[3][3][9] = {}; bool dfs(vector& board, int x, int y){ if(board[x][y] != '.'){ if(dfs(board, x, y + 1)) return true; return false; } if(y == 9){ x += 1; y = 0; } if(x >= 9) return true; // 原本就有数字 // 没数字,需要填充 for(char ch = '1'; ch