주지수
[실1] 15724 - 주지수
#include #include using namespace std; #define SIZE 1050 int n, m, t, arr[SIZE][SIZE]{ 0 }; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m; for (int i = 1; i a; arr[i][j] = a + arr[i - 1][j] + arr[i][j - 1] - arr[i - 1][j - 1]; } } cin >> t; while (t--) { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; cout