grid[i][j] -= optNums[j]; grid[i][j] += optNums[j];没取模,如果ans变成负数,就错误了
点赞 2
牛客网
牛客网在线编程
牛客网题解
牛客企业服务