제출 #432130

#제출 시각아이디문제언어결과실행 시간메모리
432130LouayFarahRectangles (IOI19_rect)C++14
8 / 100
5088 ms28288 KiB
#include "bits/stdc++.h" #include "rect.h" using namespace std; #define pb push_back #define ll long long int ll count_rectangles(vector<vector<int>> a) { int n = (int)a.size(); int m = (int)a[0].size(); ll res = 0; for(int i = 1; i<n-1; i++) { for(int j = 1; j<m-1; j++) { for(int x = i; x<n-1; x++) { for(int y = j; y<m-1; y++) { bool flag = true; for(int h = i; h<=x; h++) { for(int k = j; k<=y; k++) { if(a[h][k]>=a[h][j-1]) flag = false; if(a[h][k]>=a[h][y+1]) flag = false; if(a[h][k]>=a[i-1][k]) flag = false; if(a[h][k]>=a[x+1][k]) flag = false; } } if(flag) { /*point.pb(mp(i, j)); point.pb(mp(x, y));*/ res++; } } } } } return res; }
#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...