제출 #1134094

#제출 시각아이디문제언어결과실행 시간메모리
1134094alterioRectangles (IOI19_rect)C++20
37 / 100
5094 ms34116 KiB
#include <bits/stdc++.h> #include "rect.h" using namespace std; #define ll long long ll ans = 0; vector<vector<int>> a; void check(int x1, int y1, int x2, int y2) { for (int i = x1; i <= x2; i++) { for (int j = y1; j <= y2; j++) { if ((a[i][j] >= a[i][y1 - 1]) || (a[i][j] >= a[i][y2 + 1]) || (a[i][j] >= a[x1 - 1][j]) || (a[i][j] >= a[x2 + 1][j])) return; } } ans++; } ll count_rectangles(vector<vector<int>> _a) { a = _a; int n = a.size(), m = a[0].size(); for (int i = 1; i < n - 1; i++) { for (int j = 1; j < m - 1; j++) { for (int l = i; l < n - 1; l++) { for (int w = j; w < m - 1; w++) { check(i, j, l, w); } } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...