제출 #420565

#제출 시각아이디문제언어결과실행 시간메모리
420565SSRSRectangles (IOI19_rect)C++14
8 / 100
85 ms45968 KiB
#include <bits/stdc++.h> using namespace std; long long count_rectangles(vector<vector<int>> a){ int n = a.size(); int m = a[0].size(); assert(n <= 30 && m <= 30); int ans = 0; for (int l = 1; l < m; l++){ for (int r = l + 1; r < m; r++){ for (int u = 1; u < n; u++){ for (int d = u + 1; d < n; d++){ bool ok = true; for (int i = u; i < d; i++){ for (int j = l; j < r; j++){ if (a[i][j] >= a[u - 1][j]){ ok = false; } if (a[i][j] >= a[d][j]){ ok = false; } if (a[i][j] >= a[i][l - 1]){ ok = false; } if (a[i][j] >= a[i][r]){ ok = false; } } } if (ok){ ans++; } } } } } 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...