Tap here to switch tabs
Problem
Submissions

Problem: Equal Sum Grid Partition I

Try to solve the Equal Sum Grid Partition I problem.

Statement

You are given an m ×\times n integer matrix grid.

Determine whether it is possible to make either a single horizontal cut or a single vertical cut to partition grid into two non empty rectangular sections such that the sum of the elements in both sections is equal.

Return true if such a partition is possible, or false otherwise.

Constraints:

  • 1≤1 \leq m ==== grid.length ≤105\leq 10^5

  • 1≤1 \leq n ==== grid[i].length ≤105\leq 10^5

  • 2≤2 \leq m ×\times n ≤105\leq 10^5

  • 1≤1 \leq grid[i][j] ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Equal Sum Grid Partition I

Try to solve the Equal Sum Grid Partition I problem.

Statement

You are given an m ×\times n integer matrix grid.

Determine whether it is possible to make either a single horizontal cut or a single vertical cut to partition grid into two non empty rectangular sections such that the sum of the elements in both sections is equal.

Return true if such a partition is possible, or false otherwise.

Constraints:

  • 1≤1 \leq m ==== grid.length ≤105\leq 10^5

  • 1≤1 \leq n ==== grid[i].length ≤105\leq 10^5

  • 2≤2 \leq m ×\times n ≤105\leq 10^5

  • 1≤1 \leq grid[i][j] ≤105\leq 10^5