NeetCode #812LC-861MediumGreedy
← Back to All Problems

#812 · #861 · Score After Flipping Matrix(翻转矩阵后的得分)

📌 Problem Statement & Constraints

You are given an m x n binary matrix grid. A move picks any row or column and flips every value in it. The score of the matrix is the sum, over rows, of the row interpreted as a binary number. Maximise the score. Constraints: 1 <= m, n <= 20, grid[i][j] is 0 or 1.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!