Submission #1000956

#TimeUsernameProblemLanguageResultExecution timeMemory
1000956irmuunRectangles (IOI19_rect)C++17
18 / 100
5079 ms28316 KiB
#include<bits/stdc++.h> #include "rect.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() ll count_rectangles(vector<vector<int>>a){ ll ans=0; int n=a.size(),m=a[0].size(); for(int r1=1;r1<=n-2;r1++){ for(int r2=r1;r2<=n-2;r2++){ for(int c1=1;c1<=m-2;c1++){ for(int c2=c1;c2<=m-2;c2++){ bool ok=true; for(int i=r1;i<=r2;i++){ for(int j=c1;j<=c2;j++){ if(a[i][j]>=min({a[r1-1][j],a[r2+1][j],a[i][c1-1],a[i][c2+1]})){ 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...