Submission #443273

#TimeUsernameProblemLanguageResultExecution timeMemory
443273vanicRectangles (IOI19_rect)C++14
37 / 100
5055 ms22668 KiB
#include "rect.h" #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <map> #include <array> using namespace std; typedef long long ll; ll count_rectangles(vector < vector < int > > a){ int n=a.size(); int m=a[0].size(); bool pp; ll sol=0; for(int i=1; i<n-1; i++){ for(int j=1; j<m-1; j++){ for(int k=i; k<n-1; k++){ for(int l=j; l<m-1; l++){ pp=1; for(int o=i; o<=k; o++){ for(int p=j; p<=l; p++){ if(a[o][p]>=a[i-1][p] || a[o][p]>=a[o][j-1] || a[o][p]>=a[k+1][p] || a[o][p]>=a[o][l+1]){ pp=0; break; } } if(!pp){ break; } } if(pp){ sol++; } } } } } return sol; }
#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...