제출 #145119

#제출 시각아이디문제언어결과실행 시간메모리
145119JovanK26Rectangles (IOI19_rect)C++14
37 / 100
5044 ms22904 KiB
#include "rect.h" #include<bits/stdc++.h> using namespace std; bool vis[201][201][201][201]; long long count_rectangles(vector<vector<int> > a) { long long rez=0; int n=a.size(); int m=a[0].size(); for(int i1=1;i1<n-1;i1++) { for(int j1=1;j1<m-1;j1++) { for(int i2=i1;i2<n-1;i2++) { for(int j2=j1;j2<m-1;j2++) { bool check=0; for(int i=i1;i<=i2;i++) { if(check)break; for(int j=j1;j<=j2;j++) { if(a[i][j]>=a[i1-1][j] || a[i][j]>=a[i][j1-1] || a[i][j]>=a[i2+1][j] || a[i][j]>=a[i][j2+1]) { check=1; break; } } } if(!check)rez++; } } } } return rez; }
#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...