Submission #412019

#TimeUsernameProblemLanguageResultExecution timeMemory
412019ioiRectangles (IOI19_rect)C++14
37 / 100
5077 ms28284 KiB
#include "rect.h" #include<bits/stdc++.h> using namespace std ; long long count_rectangles(vector<vector<int> > a) { int n = a.size() , m = a[0].size(); long long ans = 0 ; for(int i = 1 ; i < n - 1 ; i ++){ for(int e = i ; e < n - 1 ; e ++){ for(int j = 1 ; j < m - 1 ; j ++){ for(int ej = j ; ej < m - 1 ; ej ++){ for(int r = i ; r <= e ; r ++){ for(int c = j ; c <= ej ; c ++){ if(a[r][c] >= a[i - 1][c] || a[r][c] >= a[e + 1][c] || a[r][c] >= a[r][j - 1] || a[r][c] >= a[r][ej + 1]) goto A ; } } ans ++ ; A : continue ; } } } } 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...